"element-ui": "^2.4.6",
"vue": "^2.5.2",
想调用elementUI表格展示数据
index.vue代码
<template>
<el-table :data="tableData">
<el-table-column prop="name" label="姓名"></el-table-column>
<el-table-column prop="age" label="年龄"></el-table-column>
<el-table-column prop="address" label="科目"></el-table-column>
</el-table>
</template>
<script>
export default {
data() {
return {
tableData: [{
name:'小王',
age:29,
address:'xxxxxxxxxxxxxxxxxxx'
},
{
name:'小王',
age:29,
address:'xxxxxxxxxxxxxxxxxxx'
},
{
name:'小王',
age:29,
address:'xxxxxxxxxxxxxxxxxxx'
}
]
};
}
};
</script>
Vue.js:634 [Vue warn]: Error in created hook: "TypeError: Cannot read properties of undefined (reading 'tableId')"
found in
---> <ElTableColumn>
<Anonymous>
<App>
<Root>
warn @ Vue.js:634
logError @ Vue.js:1893
globalHandleError @ Vue.js:1888
handleError @ Vue.js:1848
invokeWithErrorHandling @ Vue.js:1871
callHook @ Vue.js:4214
Vue._init @ Vue.js:4996
VueComponent @ Vue.js:5141
createComponentInstanceForVnode @ vue.esm.js?efeb:3313
init @ vue.esm.js?efeb:3142
createComponent @ Vue.js:5967
createElm @ Vue.js:5914
createChildren @ Vue.js:6042
createElm @ Vue.js:5943
createChildren @ Vue.js:6042
createElm @ Vue.js:5943
patch @ Vue.js:6464
Vue._update @ Vue.js:3940
updateComponent @ Vue.js:4061
get @ Vue.js:4472
Watcher @ Vue.js:4461
mountComponent @ Vue.js:4068
Vue.$mount @ Vue.js:9038
Vue.$mount @ Vue.js:11923
init @ vue.esm.js?efeb:3146
createComponent @ vue.esm.js?efeb:6033
createElm @ vue.esm.js?efeb:5980
patch @ vue.esm.js?efeb:6532
Vue._update @ vue.esm.js?efeb:3969
updateComponent @ vue.esm.js?efeb:4090
get @ vue.esm.js?efeb:4504
Watcher @ vue.esm.js?efeb:4493
mountComponent @ vue.esm.js?efeb:4097
Vue.$mount @ vue.esm.js?efeb:9107
Vue.$mount @ vue.esm.js?efeb:12023
init @ vue.esm.js?efeb:3146
merged @ vue.esm.js?efeb:3331
createComponent @ vue.esm.js?efeb:6033
createElm @ vue.esm.js?efeb:5980
createChildren @ vue.esm.js?efeb:6108
createElm @ vue.esm.js?efeb:6009
patch @ vue.esm.js?efeb:6532
Vue._update @ vue.esm.js?efeb:3969
updateComponent @ vue.esm.js?efeb:4090
get @ vue.esm.js?efeb:4504
Watcher @ vue.esm.js?efeb:4493
mountComponent @ vue.esm.js?efeb:4097
Vue.$mount @ vue.esm.js?efeb:9107
Vue.$mount @ vue.esm.js?efeb:12023
init @ vue.esm.js?efeb:3146
createComponent @ vue.esm.js?efeb:6033
createElm @ vue.esm.js?efeb:5980
patch @ vue.esm.js?efeb:6571
Vue._update @ vue.esm.js?efeb:3969
updateComponent @ vue.esm.js?efeb:4090
get @ vue.esm.js?efeb:4504
Watcher @ vue.esm.js?efeb:4493
mountComponent @ vue.esm.js?efeb:4097
Vue.$mount @ vue.esm.js?efeb:9107
Vue.$mount @ vue.esm.js?efeb:12023
Vue._init @ vue.esm.js?efeb:5041
Vue @ vue.esm.js?efeb:5108
eval @ main.js?1c90:18
./src/main.js @ app.js:2555
__webpack_require__ @ app.js:679
fn @ app.js:89
0 @ app.js:2572
__webpack_require__ @ app.js:679
(anonymous) @ app.js:725
(anonymous) @ app.js:728
Show 40 more frames
Vue.js:1897 TypeError: Cannot read properties of undefined (reading 'tableId')
at VueComponent.created (element-ui.common.js?ccbf:13549:1)
at invokeWithErrorHandling (Vue.js:1863:59)
at callHook (Vue.js:4214:9)
at VueComponent.Vue._init (Vue.js:4996:7)。。。。
。。。。。。。。。。。。。。。。。。。。。。。
浏览器控制台报错显示
这个提示tableId代码里没有,更换了elementUI版本2.4.6还是报同样错误