在computed里返回该动态属性的值
tableActive() {
return this.tableData[this.active];
},
watch监听
watch: {
tableActive: {
handler() {
this.$nextTick(() => {
this.$refs.mainTable?.doLayout();
});
},
deep: true,
},
},