[email protected]中的validate插件报错

1.

2.报错原因:vee-validate和elementUI的field属性冲突

.

validate.js文件:修改fieldsBagName: 'fields'-->fieldsBagName: 'fieldss', (此处多加了s)

const config = {
locale: 'zh_CN',
errorBagName: 'errors', // change if property conflicts.
fieldsBagName: 'fieldss', 
delay: 0, 
dictionary: null, 
strict: true, 
enableAutoClasses: false, 
classNames: {
touched: 'touched', // the control has been blurred
untouched: 'untouched', // the control hasn't been blurred
valid: 'valid', // model is valid
invalid: 'invalid', // model is invalid
pristine: 'pristine', // control has not been interacted with
dirty: 'dirty' // control has been interacted with
},
events: 'input|blur',
inject: true
};

猜你喜欢

转载自blog.csdn.net/kyunsoo/article/details/88873068