style: 全站接入深色主题,按新规则整改界面取值
This commit is contained in:
@@ -23,6 +23,7 @@ const emit = defineEmits<{
|
||||
|
||||
const adding = ref(false);
|
||||
const draft = ref("");
|
||||
const error = ref("");
|
||||
// 打标签的候选:字典标签 ∪ 用过的用户标签(含自动任务名标签),打开输入框时取一次
|
||||
const candidates = ref<string[]>([]);
|
||||
const candidatesLoading = ref(false);
|
||||
@@ -42,6 +43,7 @@ const loadCandidates = async () => {
|
||||
|
||||
const startAdding = () => {
|
||||
draft.value = "";
|
||||
error.value = "";
|
||||
adding.value = true;
|
||||
void loadCandidates();
|
||||
};
|
||||
@@ -52,6 +54,8 @@ const submitAdd = () => {
|
||||
adding.value = false;
|
||||
return;
|
||||
}
|
||||
if (name.length > 255) { error.value = "标签名最多255个字符"; return; }
|
||||
error.value = "";
|
||||
emit("add", name);
|
||||
draft.value = "";
|
||||
adding.value = false;
|
||||
@@ -114,6 +118,7 @@ const cancelAdd = () => {
|
||||
>
|
||||
<el-option v-for="name in candidates" :key="name" :label="name" :value="name" />
|
||||
</el-select>
|
||||
<span v-if="error" role="alert">{{ error }}</span>
|
||||
<button type="button" class="marker-add-confirm" @click.stop="submitAdd">确定</button>
|
||||
</span>
|
||||
</span>
|
||||
@@ -125,7 +130,7 @@ const cancelAdd = () => {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.marker {
|
||||
@@ -134,9 +139,12 @@ const cancelAdd = () => {
|
||||
gap: 4px;
|
||||
font-size: 12px;
|
||||
line-height: 1.4;
|
||||
padding: 1px 7px;
|
||||
border-radius: 10px;
|
||||
white-space: nowrap;
|
||||
padding: 1px 8px;
|
||||
border-radius: 8px;
|
||||
white-space: normal;
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
/* 系统标记:灰底只读,不能点 */
|
||||
@@ -158,11 +166,6 @@ const cancelAdd = () => {
|
||||
border-color: var(--green-600);
|
||||
}
|
||||
|
||||
.marker-user:focus-visible {
|
||||
outline: 2px solid var(--green-700);
|
||||
outline-offset: 1px;
|
||||
}
|
||||
|
||||
.marker-user-name {
|
||||
font-weight: 600;
|
||||
}
|
||||
@@ -178,7 +181,7 @@ const cancelAdd = () => {
|
||||
}
|
||||
|
||||
.marker-remove:hover {
|
||||
color: var(--accent-warning-strong);
|
||||
color: var(--accent-warning-text);
|
||||
}
|
||||
|
||||
.marker-add {
|
||||
@@ -191,7 +194,7 @@ const cancelAdd = () => {
|
||||
background: transparent;
|
||||
color: var(--text-secondary);
|
||||
font-size: 12px;
|
||||
border-radius: 10px;
|
||||
border-radius: 8px;
|
||||
padding: 1px 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -214,15 +217,15 @@ const cancelAdd = () => {
|
||||
.marker-add-select :deep(.el-select__wrapper) {
|
||||
min-height: 24px;
|
||||
font-size: 12px;
|
||||
padding: 0 6px;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.marker-add-confirm {
|
||||
border: none;
|
||||
background: var(--green-700);
|
||||
color: #fff;
|
||||
color: var(--text-on-accent);
|
||||
font-size: 12px;
|
||||
border-radius: 6px;
|
||||
border-radius: 8px;
|
||||
padding: 2px 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user