|
@@ -44,9 +44,20 @@ class DonMessage {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// 修改默认属性
|
|
|
+// 修改默认属性
|
|
|
ElementUI.Dialog.props.closeOnClickModal.default = false;
|
|
|
// ElementUI.Dialog.props.destroyOnClose.default = true;
|
|
|
+
|
|
|
+// 全局修改选择如果value与label都为数字0则清空
|
|
|
+const SelectValueWatch = ElementUI.Select.watch.value
|
|
|
+ElementUI.Select.watch.value = function (newValue, oldValue) {
|
|
|
+ SelectValueWatch.call(this, newValue, oldValue)
|
|
|
+ if(this.selected && this.selected.value === 0 && this.selected.currentLabel === 0 && newValue !== oldValue) {
|
|
|
+ this.handleClearClick.call(this, {
|
|
|
+ stopPropagation: () => {}
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
Vue.use(ElementUI)
|
|
|
// 命名根据需要,DonMessage只是在文章中使用
|
|
|
export const $message = new DonMessage()
|