<template> <el-table ref="table" :height="500" :data="dataSource" show-summary /> </template> <script> export default { data() { return { dataSource: [] } }, updated() { this.$nextTick(() => { this.$refs.table.doLayout() }) } } </script>
在此更新方法中使用更新表格组件
updated() { this.$nextTick(() => { this.$refs.table.doLayout() }) }
标签:nextTick,el,表格,refs,element,Ui,doLayout,table From: https://www.cnblogs.com/lujh/p/16594150.html