chore: move mixins
This commit is contained in:
@@ -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;
|
||||
}
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user