图片内容太小,如下:
vue.js:1193
[Vue warn]: Property or method "rules" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.(found in <Root>)
发现:
rules 这个没有定义
原来:
data:{
dataList: [],//当前页要展示的分页列表数据
formData: {},//表单数据
dialogFormVisible: false,//增加表单是否可见
dialogFormVisible4Edit:false,//编辑表单是否可见
pagination: {},//分页模型数据,暂时弃用
},
改正后:
data:{
dataList: [],//当前页要展示的分页列表数据
formData: {},//表单数据
dialogFormVisible: false,//增加表单是否可见
dialogFormVisible4Edit:false,//编辑表单是否可见
pagination: {},//分页模型数据,暂时弃用
rules:{//校验规则
type:[{required:true,message:'图书类别为必填项',trigger:'blur'}],
name:[{required:true,message:'图书名称为必填项',trigger:'blur'}],
}
},