添加一个简单的自定义方法查询功能
This commit is contained in:
@@ -266,4 +266,223 @@ div.decoration-depth {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
div.custommethods-search {
|
||||
position: relative;
|
||||
margin: 16px 0;
|
||||
|
||||
& .cm-search {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
& .cm-query {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
padding: 8px 12px;
|
||||
font-family: d9c, d9, monospace;
|
||||
font-size: 15px;
|
||||
color: inherit;
|
||||
background-color: var(--background-color);
|
||||
border: 1px solid var(--background-border-color);
|
||||
border-radius: 6px;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: #3b8e59;
|
||||
}
|
||||
}
|
||||
|
||||
& .cm-suggest {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: calc(100% + 4px);
|
||||
z-index: 30;
|
||||
margin: 0;
|
||||
padding: 4px;
|
||||
list-style: none;
|
||||
max-height: 260px;
|
||||
overflow-y: auto;
|
||||
background-color: var(--background-color);
|
||||
border: 1px solid var(--background-border-color);
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
|
||||
|
||||
&:empty {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
& .cm-suggest-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
gap: 12px;
|
||||
padding: 6px 8px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background-color: rgba(127, 127, 127, 0.16);
|
||||
}
|
||||
}
|
||||
|
||||
& .cm-suggest-name {
|
||||
font-family: d9c, d9, monospace;
|
||||
}
|
||||
|
||||
& .cm-suggest-desc {
|
||||
font-size: 12px;
|
||||
opacity: 0.6;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
& .cm-selected {
|
||||
position: relative;
|
||||
margin-top: 10px;
|
||||
padding: 12px;
|
||||
border: 1px solid var(--background-border-color);
|
||||
border-radius: 6px;
|
||||
background-color: rgba(127, 127, 127, 0.06);
|
||||
}
|
||||
|
||||
& .cm-head {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 10px;
|
||||
margin-bottom: 10px;
|
||||
padding-right: 56px;
|
||||
}
|
||||
|
||||
& .cm-name {
|
||||
font-family: d9c, d9, monospace;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
& .cm-desc {
|
||||
font-size: 12px;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
& .cm-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
& .cm-param {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
& .cm-param-name {
|
||||
font-family: d9c, d9, monospace;
|
||||
font-size: 13px;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
& .cm-input {
|
||||
padding: 4px 6px;
|
||||
font-size: 14px;
|
||||
color: inherit;
|
||||
background-color: var(--background-color);
|
||||
border: 1px solid var(--background-border-color);
|
||||
border-radius: 4px;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: #3b8e59;
|
||||
}
|
||||
}
|
||||
|
||||
& select.cm-input {
|
||||
min-width: 90px;
|
||||
}
|
||||
|
||||
& input.cm-input[type="number"] {
|
||||
width: 96px;
|
||||
}
|
||||
|
||||
& input.cm-input[type="text"] {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
& .cm-preview {
|
||||
display: block;
|
||||
margin-top: 12px;
|
||||
padding: 8px 10px;
|
||||
font-family: d9c, d9, monospace;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
background-color: rgba(127, 127, 127, 0.12);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
& .cm-empty {
|
||||
font-size: 13px;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
& .cm-input.cm-invalid,
|
||||
& .cm-combo.cm-invalid .cm-input {
|
||||
border-color: #e5484d;
|
||||
box-shadow: 0 0 0 1px #e5484d;
|
||||
}
|
||||
|
||||
& .cm-combo {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
& .cm-combo-input {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
& .cm-combo-list {
|
||||
position: absolute;
|
||||
top: calc(100% + 2px);
|
||||
left: 0;
|
||||
min-width: 100%;
|
||||
z-index: 40;
|
||||
margin: 0;
|
||||
padding: 4px;
|
||||
list-style: none;
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
background-color: var(--background-color);
|
||||
border: 1px solid var(--background-border-color);
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
|
||||
}
|
||||
|
||||
& .cm-combo-item {
|
||||
padding: 4px 8px;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background-color: rgba(127, 127, 127, 0.16);
|
||||
}
|
||||
}
|
||||
|
||||
& .cm-copy {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 8px;
|
||||
padding: 2px 10px;
|
||||
font-size: 12px;
|
||||
color: inherit;
|
||||
background-color: var(--background-color);
|
||||
border: 1px solid var(--background-border-color);
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: #3b8e59;
|
||||
border-color: #3b8e59;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user