vue table dynamic column resize bug All In One
vue table dynamic column resize bug All In One
elememt-ui 表格渲染错位
doLayout | 对 Table 进行重新布局。当 Table 或其祖先元素由隐藏切换为显示时,可能需要调用此方法 |
---|---|
https://element.eleme.io/#/zh-CN/component/table#table-methods
async getTableData () {
this.columns = [];
this.gridData = [];
let params = this.getParams;
this.tableLoading = true;
const res = await Table2AdCustomSubService.getDayDetailData(params).finally(() => {
this.tableLoading = false;
});
const {header, data} = res?.data?.data ?? {};
this.heads = res.data.data.header;
this.data = res.data.data.data;
this.$nextTick(() => {
// this.autoResizeTable();
// 获得数据后,立刻更新 DOM
this.$refs.tableRef.doLayout();
});
},
refs
©xgqfrms 2012-2020
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/15871116.html
未经授权禁止转载,违者必究!