fix: 缺陷列表错位
This commit is contained in:
parent
43343bf7b9
commit
f8b2b5b7ae
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div v-if="tableActive">
|
||||
<div>
|
||||
<el-table
|
||||
border
|
||||
:data="data"
|
||||
|
@ -115,7 +115,6 @@ export default {
|
|||
selectDataCounts: 0,
|
||||
selectRows: new Set(),
|
||||
selectIds: [],
|
||||
tableActive: true,
|
||||
hasBatchTipShow: false
|
||||
};
|
||||
},
|
||||
|
@ -350,16 +349,13 @@ export default {
|
|||
},
|
||||
resetHeader() {
|
||||
this.$emit('update:fields', getCustomTableHeader(this.fieldKey, this.customFields));
|
||||
this.reloadTable();
|
||||
this.doLayout();
|
||||
},
|
||||
toggleRowSelection() {
|
||||
this.$refs.table.toggleRowSelection();
|
||||
},
|
||||
reloadTable() {
|
||||
this.tableActive = false;
|
||||
this.$nextTick(() => {
|
||||
this.tableActive = true;
|
||||
});
|
||||
this.doLayout();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -840,8 +840,4 @@ export default {
|
|||
.el-tag {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
/*/deep/ .el-table__fixed-body-wrapper {*/
|
||||
/* top: 60px !important;*/
|
||||
/*}*/
|
||||
</style>
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
prop="num"
|
||||
:field="item"
|
||||
sortable
|
||||
min-width="100"
|
||||
:fields-width="fieldsWidth">
|
||||
</ms-table-column>
|
||||
|
||||
|
@ -56,6 +57,7 @@
|
|||
:fields-width="fieldsWidth"
|
||||
:label="$t('test_track.issue.title')"
|
||||
sortable
|
||||
min-width="110"
|
||||
prop="title">
|
||||
</ms-table-column>
|
||||
|
||||
|
@ -64,6 +66,7 @@
|
|||
:fields-width="fieldsWidth"
|
||||
:filters="platformFilters"
|
||||
:label="$t('test_track.issue.platform')"
|
||||
min-width="80"
|
||||
prop="platform">
|
||||
</ms-table-column>
|
||||
|
||||
|
@ -71,6 +74,7 @@
|
|||
:field="item"
|
||||
:fields-width="fieldsWidth"
|
||||
sortable
|
||||
min-width="110"
|
||||
:label="$t('test_track.issue.platform_status') "
|
||||
prop="platformStatus">
|
||||
<template v-slot="scope">
|
||||
|
@ -83,6 +87,7 @@
|
|||
:fields-width="fieldsWidth"
|
||||
column-key="creator"
|
||||
sortable
|
||||
min-width="100"
|
||||
:label="$t('custom_field.issue_creator')"
|
||||
prop="creatorName">
|
||||
</ms-table-column>
|
||||
|
@ -221,7 +226,14 @@ export default {
|
|||
isThirdPart: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$route'(to, from) {
|
||||
window.removeEventListener("resize", this.tableDoLayout);
|
||||
},
|
||||
},
|
||||
activated() {
|
||||
// 解决错位问题
|
||||
window.addEventListener('resize', this.tableDoLayout);
|
||||
getProjectMember((data) => {
|
||||
this.members = data;
|
||||
});
|
||||
|
@ -270,6 +282,9 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
tableDoLayout() {
|
||||
this.$refs.table.doLayout();
|
||||
},
|
||||
getCustomFieldValue(row, field) {
|
||||
return getCustomFieldValue(row, field, this.members);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue