UNPKG

tav-ui

Version:
33 lines (30 loc) 752 B
import { unref, nextTick } from 'vue'; function useTableFullHeight(propsRef, tableElRef) { const { fullHeight } = unref(propsRef); if (!fullHeight) return; let headEl; let bodyEl; let contentEl; async function calcTableHeight() { await nextTick(); const table = unref(tableElRef); if (!table) return; const tableEl = table.$el; if (!tableEl) return; if (!bodyEl) { bodyEl = tableEl.querySelector(".ant-table-body"); if (!bodyEl) return; } headEl = tableEl.querySelector(".ant-table-thead"); if (!headEl) return; bodyEl.style.minHeight = `${170}px`; } calcTableHeight(); } export { useTableFullHeight }; //# sourceMappingURL=useTableFullHeight2.mjs.map