// 获取列表
async getTableList (page) {
if (page) this.search.page.current = page
const res = await abloodResultList(this.search)
if (res.code === 200) {
this.tableData = res.data.records
this.tableTotal = res.data.total
}
this.$nextTick(() => {
this.$refs.singleTable.doLayout()
})
},
在表格中使用v-if 表格样式会乱
解决办法:获取列表时加上一行 this.$refs.singleTable.doLayout()就可以解决问题