chore: move mixins

This commit is contained in:
chenjiahan
2020-07-05 16:00:10 +08:00
parent 3a2e20eb52
commit 4a25ebf9ab
14 changed files with 844 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
export const FieldMixin = {
inject: {
vanField: {
default: null,
},
},
watch: {
value() {
const field = this.vanField;
if (field) {
field.resetValidation();
field.validateWithTrigger('onChange');
}
},
},
created() {
const field = this.vanField;
if (field && !field.children) {
field.children = this;
}
},
};