mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-30 13:02:46 +08:00
添加空名称检查功能:在 DictEditor 组件的 addItem 方法中,增加了对名称为空的验证,若名称为空则显示提示信息并阻止添加操作。
This commit is contained in:
parent
e942259c2e
commit
60db7be873
@ -238,6 +238,10 @@ export default defineComponent({
|
|||||||
addItem() {
|
addItem() {
|
||||||
if (this.options?.disableAdd) return;
|
if (this.options?.disableAdd) return;
|
||||||
const dict = { ...this.modelValue };
|
const dict = { ...this.modelValue };
|
||||||
|
if (dict[""]) {
|
||||||
|
quickcommand.showMessageBox("名称不能为空");
|
||||||
|
return;
|
||||||
|
}
|
||||||
dict[""] = newVarInputVal("str");
|
dict[""] = newVarInputVal("str");
|
||||||
this.$emit("update:modelValue", dict);
|
this.$emit("update:modelValue", dict);
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user