✨(component): 修复 transition 动画导致的 header 错位
This commit is contained in:
@@ -397,6 +397,7 @@
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
margin-bottom: -1px;
|
||||
transition:all 0.1s ease-in-out;
|
||||
}
|
||||
|
||||
.layui-table-body .layui-none {
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user