js: data() { return { rules: { name: [ { reuired: true, message: '请输入名称' }, { validator: function (rule, value, callback) { if (value == '测试') { callback(new Error('名字不能是测试!')) } else { callback() } } } ] } } }
2023-09-27 09:48:10
js: data() { return { rules: { name: [ { reuired: true, message: '请输入名称' }, { validator: function (rule, value, callback) { if (value == '测试') { callback(new Error('名字不能是测试!')) } else { callback() } } } ] } } }