From d934dbe419f57ff5e39caddc3e3e0373b577f1cb Mon Sep 17 00:00:00 2001 From: chiyi Date: Mon, 12 Oct 2026 14:18:50 +0800 Subject: [PATCH] =?UTF-8?q?feat(canvas):=20=E4=B8=8B=E6=8B=89=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E6=8D=A2=E6=88=90=20SelectMenu=20=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=B9=B6=E6=94=AF=E6=8C=81=E5=90=91=E4=B8=8A=E5=B1=95=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/SelectMenu.vue | 6 +- frontend/src/views/CanvasView.vue | 132 +++++++++++++------------ 2 files changed, 74 insertions(+), 64 deletions(-) diff --git a/frontend/src/components/SelectMenu.vue b/frontend/src/components/SelectMenu.vue index 0e0bde4..9c49ca3 100644 --- a/frontend/src/components/SelectMenu.vue +++ b/frontend/src/components/SelectMenu.vue @@ -13,6 +13,7 @@ const props = defineProps({ placeholder: { type: String, default: '请选择' }, mono: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, + up: { type: Boolean, default: false }, // 面板向上展开(底部居中的输入框用) }) const emit = defineEmits(['update:modelValue']) @@ -90,8 +91,9 @@ onUnmounted(() => document.removeEventListener('mousedown', onDocClick)) leave-from-class="opacity-100 translate-y-0" leave-to-class="opacity-0 -translate-y-1">
+ class="absolute z-30 w-full max-h-64 overflow-auto rounded-xl border border-[color:var(--glass-border)] + bg-[var(--menu-bg)] backdrop-blur-xl p-1.5 shadow-[var(--glass-shadow-lg)]" + :class="up ? 'bottom-full mb-2' : 'mt-2'"> - + @@ -881,52 +897,43 @@ const saveLabel = computed(() => ({ placeholder="描述你要生成的画面…(留空则使用选中的笔记)" />
- - - - - - + class="cv-dd" + :options="countOptions" + up + />
⚠ 还没有可用的{{ gen.kind === 'video' ? '视频' : '图像' }}模型
@@ -1056,8 +1063,21 @@ const saveLabel = computed(() => ({ gap: 7px; flex-wrap: wrap; } -.cv-select { - max-width: 220px; +/* 统一自定义下拉的宽度/紧凑度(SelectMenu 内部是 .field 按钮) */ +.cv-dd { + min-width: 96px; +} +.cv-dd--canvas { + width: 200px; + min-width: 0; +} +.cv-dd :deep(.field) { + height: 34px; + padding: 0 10px; + font-size: 12.5px; +} +.cv-dd--canvas :deep(.field) { + height: 30px; } .cv-sep { width: 2.5px; @@ -1185,7 +1205,7 @@ const saveLabel = computed(() => ({ backdrop-filter: blur(18px); box-shadow: var(--glass-shadow-lg); transition: border-color 0.15s ease, box-shadow 0.15s ease; - overflow: hidden; + overflow: visible; /* 下拉面板要从输入框上方弹出,不能被裁切 */ } .cv-composer:focus-within { border-color: rgb(124 92 252 / 0.6); @@ -1285,24 +1305,12 @@ const saveLabel = computed(() => ({ flex-wrap: wrap; padding: 8px 12px; border-top: 1px solid var(--ink-soft); + border-radius: 0 0 19px 19px; /* composer 不再裁切,圆角由最底层行补齐 */ } -.cv-composer__sel { - padding: 5px 9px; - border-radius: 9px; - border: 1px solid var(--ink-soft); - background: transparent; - color: var(--fg); - font-size: 12px; - font-weight: 600; - outline: none; - max-width: 200px; -} -.cv-composer__sel:focus { - border-color: rgb(124 92 252 / 0.6); -} -.cv-composer__sel--model { +.cv-composer__bar .cv-dd--model { flex: 1; - min-width: 130px; + min-width: 140px; + max-width: 260px; } .cv-composer__bar .cv-gen { margin-left: auto;