BasicTable.vue:116 Uncaught (in promise) TypeError: Cannot read properties of null (reading '$el')
此段报错是因为在created钩子中为创建组件实例,所以将操作放到onMounted中即可解决此报错!
onMounted(() => {
console.log(tableElRef.value.$el.offsetHeight);
});
BasicTable.vue:116 Uncaught (in promise) TypeError: Cannot read properties of null (reading '$el')
此段报错是因为在created钩子中为创建组件实例,所以将操作放到onMounted中即可解决此报错!
onMounted(() => {
console.log(tableElRef.value.$el.offsetHeight);
});