使用 Table组件报错
因为data中初始化变量类型不匹配而报错
突然就报了13个错
- Invalid prop: type check failed for prop “data”. Expected Array, got Object
- Error in callback for immediate watcher “data”: “TypeError: data.indexOf is not a function”
- data.indexOf is not a function
- data.reduce is not a function
- Error in mounted hook: “TypeError: this.$el.querySelectorAll is not a function”
- …
发现原因
data: {
return {
pagination: {
pagesize: 4,
pagenum