Skip to content

Commit

Permalink
fix(table): empty center
Browse files Browse the repository at this point in the history
  • Loading branch information
chaishi committed Jul 31, 2023
1 parent a349a3e commit a1ea4c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/table/hooks/useFixed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,9 @@ export default function useFixed(
};

const updateThWidthListHandler = () => {
if (notNeedThWidthList.value) return;
const timer = setTimeout(() => {
updateTableWidth();
if (notNeedThWidthList.value) return;
const thead = tableContentRef.value?.querySelector('thead');
if (!thead) return;
updateThWidthList(thead.children);
Expand Down Expand Up @@ -542,6 +542,7 @@ export default function useFixed(
onMounted(() => {
const scrollWidth = getScrollbarWidthWithCSS();
scrollbarWidth.value = scrollWidth;
updateThWidthListHandler();
const isWatchResize = isFixedColumn.value || isFixedHeader.value || !notNeedThWidthList.value || !data.value.length;
// IE 11 以下使用 window resize;IE 11 以上使用 ResizeObserver
if ((isWatchResize && getIEVersion() < 11) || typeof window.ResizeObserver === 'undefined') {
Expand Down

0 comments on commit a1ea4c7

Please sign in to comment.