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; +}