(component): 修复 transition 动画导致的 header 错位

This commit is contained in:
就眠儀式
2022-10-09 17:42:16 +08:00
parent fbfb86166c
commit edd09ae971
3 changed files with 19 additions and 8 deletions

View File

@@ -397,6 +397,7 @@
position: relative;
overflow: auto;
margin-bottom: -1px;
transition:all 0.1s ease-in-out;
}
.layui-table-body .layui-none {

View File

@@ -266,7 +266,8 @@ watch(
tableDataSource.value = [...props.dataSource];
tableSelectedKeys.value = [];
tableSelectedKey.value = s;
}, { deep: true }
},
{ deep: true }
);
const changeAll = (isChecked: boolean) => {
@@ -447,14 +448,12 @@ watch(
() => [props.height, props.maxHeight, props.dataSource],
() => {
nextTick(() => {
console.log("触发");
getScrollWidth();
});
}
);
onMounted(() => {
getScrollWidth();
getFixedColumn();
@@ -462,6 +461,10 @@ onMounted(() => {
getFixedColumn();
});
tableBody.value?.addEventListener("transitionend", () => {
getScrollWidth();
})
window.onresize = () => {
getScrollWidth();
getFixedColumn();