🐛(component): 修复 table 组件因 loading 加载时机产生的错位

This commit is contained in:
就眠儀式 2022-08-16 08:44:06 +08:00
parent 06ce321357
commit 5abad236ee
2 changed files with 4 additions and 13 deletions

View File

@ -448,22 +448,13 @@ const classes = computed(() => {
}); });
watch( watch(
() => props.height, () => [props.height, props.maxHeight, props.dataSource],
() => { () => {
nextTick(() => { nextTick(() => {
getScrollWidth(); getScrollWidth();
}); })
} }
); )
watch(
() => props.maxHeight,
() => {
nextTick(() => {
getScrollWidth();
});
}
);
onMounted(() => { onMounted(() => {
getScrollWidth(); getScrollWidth();

View File

@ -10,4 +10,4 @@ export const withInstall = <T>(comp: T): T & Plugin => {
}; };
return component as T & Plugin; return component as T & Plugin;
}; };