From d8a61ae5ec919b8c357595e1c49c4f50adaa9f14 Mon Sep 17 00:00:00 2001 From: fofolee Date: Mon, 24 Mar 2025 17:30:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E6=8E=92=E6=94=AF=E6=8C=81=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/composer/ComposerCard.vue | 1 + src/components/composer/card/CommandHead.vue | 57 +++++++++++++++++--- 2 files changed, 51 insertions(+), 7 deletions(-) diff --git a/src/components/composer/ComposerCard.vue b/src/components/composer/ComposerCard.vue index 1d308cd..8854ab9 100644 --- a/src/components/composer/ComposerCard.vue +++ b/src/components/composer/ComposerCard.vue @@ -36,6 +36,7 @@ -
-
+
+
{{ command.label }}
- {{ command.summary }} +
+ {{ commandSummary || "添加描述" }} + 单击修改描述 +
+
@@ -70,13 +84,24 @@ export default { components: { CommandButtons, }, + data() { + return { + isEditingSummary: false, + }; + }, props: { command: { type: Object, required: true, }, }, - emits: ["update:outputVariable", "run", "remove", "toggle-collapse"], + emits: [ + "update:outputVariable", + "update:summary", + "run", + "remove", + "toggle-collapse", + ], computed: { contentClass() { return { @@ -100,6 +125,9 @@ export default { isCollapsed() { return this.command.isCollapsed; }, + commandSummary() { + return this.command.userComments || this.command.summary; + }, }, }; @@ -142,14 +170,29 @@ export default { } .command-summary { - max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + color: gray; + font-size: 11px; +} + +.summary-container { + cursor: text; + width: 200px; } .info-icon { opacity: 0.6; font-size: 12px; } + +.summary-input :deep(.q-field__control), +.summary-input :deep(.q-field__native), +.summary-input :deep(.q-field__marginal) { + height: 20px !important; + min-height: 20px; + font-size: 11px; + color: gray; +}