Commit aac56ccb by 姜雷

控件添加change事件

parent f4a9602e
......@@ -26,7 +26,7 @@ export default {
value: Number,
disabled: Boolean,
clearable: {
type:Boolean,
type: Boolean,
default: true,
},
},
......@@ -35,8 +35,10 @@ export default {
changeHandle(val) {
if (val) {
this.$emit('input', val);
this.$emit('change', val);
} else {
this.$emit('input', null);
this.$emit('change', null);
}
},
},
......
......@@ -40,8 +40,10 @@ export default {
changeHandle(val) {
if (val || val === 0) {
this.$emit('input', val);
this.$emit('change', val);
} else {
this.$emit('input', null);
this.$emit('change', null);
}
},
disabledValue(val) {
......
......@@ -54,6 +54,12 @@ export default {
});
}
},
methods: {
changeHandle(val) {
this.$emit('input', val);
this.$emit('change', val);
},
},
};
</script>
......@@ -26,9 +26,6 @@ export default {
},
methods: {
...mapActions(actionsList),
changeHandle(val) {
this.$emit('input', val);
},
getOptionsList(label) {
let optionValue = this.getOptionsValue(label);
if (optionValue) {
......
......@@ -33,6 +33,7 @@ export default {
methods: {
changeHandle(val) {
this.$emit('input', val);
this.$emit('change', val);
},
},
};
......
......@@ -31,7 +31,7 @@ export default {
},
disabled: Boolean,
clearable: {
type:Boolean,
type: Boolean,
default: true,
},
},
......@@ -46,8 +46,10 @@ export default {
changeHandle(val) {
if (!val) {
this.$emit('input', null);
this.$emit('change', null);
} else {
this.$emit('input', val);
this.$emit('change', val);
}
},
},
......
......@@ -40,8 +40,10 @@ export default {
changeHandle(val) {
if (val || val === 0) {
this.$emit('input', val);
this.$emit('change', val);
} else {
this.$emit('input', null);
this.$emit('change', null);
}
},
},
......
......@@ -10,7 +10,7 @@ import {
import rymUi from 'rym-element-ui';
import 'rym-element-ui/lib/rymUi.css';
import errorHandler from './errorHandler';
// import errorHandler from './errorHandler';
import HeaderImg from '../components/HeaderImg/HeaderImg.vue';
import UserWithContent from '../components/UserCard/UserWithContent.vue';
......@@ -37,7 +37,7 @@ const extendVue = Vue => {
Vue.prototype.$formatterMoneyToDouble = formatterMoneyToDouble;
Vue.prototype.$formatPrice = formatPrice;
Vue.config.errorHandler = errorHandler;
// Vue.config.errorHandler = errorHandler;
Vue.component('UserCard', UserCard);
Vue.component('UserInfo', UserInfo);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment