fix(测试跟踪): 自定义表头失效

--bug=1014240 --user=陈建星 【测试跟踪】自定义表头调整字段顺序后,列表显示不正确,刷新后正常 https://www.tapd.cn/55049933/s/1186931
This commit is contained in:
chenjianxing 2022-06-20 16:26:23 +08:00 committed by f2c-ci-robot[bot]
parent 9e896cb0ce
commit 4f4e5a56e7
1 changed files with 9 additions and 2 deletions

View File

@ -1,6 +1,7 @@
<template> <template>
<div> <div>
<el-table <el-table
v-if="tableActive"
border border
class="test-content adjust-table ms-table" class="test-content adjust-table ms-table"
v-loading="tableIsLoading" v-loading="tableIsLoading"
@ -164,7 +165,8 @@ export default {
selectRows: new Set(), selectRows: new Set(),
selectIds: [], selectIds: [],
hasBatchTipShow: false, hasBatchTipShow: false,
defaultSort: {} defaultSort: {},
tableActive: true
}; };
}, },
props: { props: {
@ -480,7 +482,12 @@ export default {
}, },
resetHeader() { resetHeader() {
this.$emit('update:fields', getCustomTableHeader(this.fieldKey, this.customFields)); this.$emit('update:fields', getCustomTableHeader(this.fieldKey, this.customFields));
this.reloadTable(); this.tableActive = false;
this.$nextTick(() => {
this.doLayout();
this.tableActive = true;
});
this.listenRowDrop();
}, },
toggleRowSelection() { toggleRowSelection() {
this.$refs.table.toggleRowSelection(); this.$refs.table.toggleRowSelection();