refactor(测试跟踪): 测试报告表格在浏览器尺寸发生变化下触发重新布局函数,防止表格错位

--bug=1025014 --user=宋天阳 【测试跟踪】报告列表-将窗口从显示器拖动到MAC终端-复选框和列表数据显示错位
https://www.tapd.cn/55049933/s/1358153
This commit is contained in:
song-tianyang 2023-03-31 15:16:51 +08:00 committed by 建国
parent ec3a42c9ea
commit 939b152149
1 changed files with 8 additions and 0 deletions

View File

@ -295,10 +295,18 @@ export default {
watch: {
$route(to, from) {},
},
created() {
window.addEventListener("resize", this.resizeTable, false);
},
activated() {
this.init();
},
methods: {
resizeTable() {
if (this.$refs.testPlanReportTable) {
this.$refs.testPlanReportTable.doLayout();
}
},
init() {
this.projectId = this.$route.params.projectId;
this.batchButtons = this.publicButtons;