From 60db7be8730b041973f160e99b69b79b5f4fcab5 Mon Sep 17 00:00:00 2001 From: fofolee Date: Thu, 23 Jan 2025 08:51:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=A9=BA=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E5=8A=9F=E8=83=BD=EF=BC=9A=E5=9C=A8=20DictEd?= =?UTF-8?q?itor=20=E7=BB=84=E4=BB=B6=E7=9A=84=20addItem=20=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E4=B8=AD=EF=BC=8C=E5=A2=9E=E5=8A=A0=E4=BA=86=E5=AF=B9?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=EF=BC=8C=E8=8B=A5=E5=90=8D=E7=A7=B0=E4=B8=BA=E7=A9=BA=E5=88=99?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF=E5=B9=B6?= =?UTF-8?q?=E9=98=BB=E6=AD=A2=E6=B7=BB=E5=8A=A0=E6=93=8D=E4=BD=9C=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/composer/common/DictEditor.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/composer/common/DictEditor.vue b/src/components/composer/common/DictEditor.vue index bbbb98b..362d99f 100644 --- a/src/components/composer/common/DictEditor.vue +++ b/src/components/composer/common/DictEditor.vue @@ -238,6 +238,10 @@ export default defineComponent({ addItem() { if (this.options?.disableAdd) return; const dict = { ...this.modelValue }; + if (dict[""]) { + quickcommand.showMessageBox("名称不能为空"); + return; + } dict[""] = newVarInputVal("str"); this.$emit("update:modelValue", dict); },