mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-18 01:44:36 +08:00
优化参数值为空和传递空参数的逻辑
This commit is contained in:
@@ -67,13 +67,17 @@ export default defineComponent({
|
||||
return this.modelValue;
|
||||
},
|
||||
set(value) {
|
||||
this.$emit("update:modelValue", value);
|
||||
if (value === null || value === undefined || value === "") {
|
||||
this.$emit("update:modelValue", null);
|
||||
} else {
|
||||
this.$emit("update:modelValue", value);
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
updateNumber(delta) {
|
||||
this.$emit("update:modelValue", this.localValue + delta);
|
||||
this.$emit("update:modelValue", (this.localValue || 0) + delta);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user