diff --git a/cwd-admin/src/components/TagInput.vue b/cwd-admin/src/components/TagInput.vue new file mode 100644 index 0000000..5f82b33 --- /dev/null +++ b/cwd-admin/src/components/TagInput.vue @@ -0,0 +1,157 @@ + + + + + diff --git a/cwd-admin/src/styles/components/setting.less b/cwd-admin/src/styles/components/setting.less index e27dcd0..1c78439 100644 --- a/cwd-admin/src/styles/components/setting.less +++ b/cwd-admin/src/styles/components/setting.less @@ -1,4 +1,4 @@ -.page { +.settings-content { max-width: 620px; } @@ -69,83 +69,6 @@ box-shadow: 0 0 0 1px rgba(9, 105, 218, 0.2); } -.tag-input { - padding: 4px 6px; - border-radius: 4px; - border: 1px solid var(--border-color); - background-color: var(--bg-input); -} - -.tag-input-inner { - display: flex; - flex-wrap: wrap; - gap: 6px; -} - -.tag-input-tag { - display: inline-flex; - align-items: center; - max-width: 100%; - padding: 2px 8px; - border-radius: 999px; - background-color: var(--bg-sider); - color: var(--text-primary); - font-size: 13px; - position: relative; -} - -.tag-input-tag-text { - max-width: 180px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.tag-input-tag-remove { - border: none; - padding: 0; - background: none; - cursor: pointer; - color: var(--text-secondary); - font-size: 12px; - opacity: 0; - visibility: hidden; - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - width: 100%; - height: 100%; - display: inline-flex; - align-items: center; - justify-content: center; -} - -.tag-input-tag-remove:hover { - color: var(--color-danger); -} - -.tag-input-tag:hover .tag-input-tag-text { - opacity: 0; - visibility: hidden; -} - -.tag-input-tag:hover .tag-input-tag-remove { - opacity: 1; - visibility: visible; -} - -.tag-input-input { - flex: 1; - min-width: 120px; - border: none; - outline: none; - background: transparent; - padding: 4px 2px; - font-size: 14px; - color: var(--text-primary); -} - .switch { position: relative; display: inline-flex; diff --git a/cwd-admin/src/views/SettingsView/index.vue b/cwd-admin/src/views/SettingsView/index.vue index b8faf77..e45cdec 100644 --- a/cwd-admin/src/views/SettingsView/index.vue +++ b/cwd-admin/src/views/SettingsView/index.vue @@ -61,7 +61,7 @@ -
+