parent
0bc1e0a620
commit
b265d75c9a
|
@ -1,3 +1,4 @@
|
|||
// base rc-table@7.17.2
|
||||
import type { GetRowKey, Key, GetComponentProps } from '../interface';
|
||||
import ExpandedRow from './ExpandedRow';
|
||||
import { getColumnsKey } from '../utils/valueUtil';
|
||||
|
|
|
@ -449,13 +449,20 @@ export default defineComponent<TableProps<DefaultRecordType>>({
|
|||
}
|
||||
};
|
||||
let timtout;
|
||||
const updateWidth = (width: number) => {
|
||||
if (width !== componentWidth.value) {
|
||||
triggerOnScroll();
|
||||
componentWidth.value = fullTableRef.value ? fullTableRef.value.offsetWidth : width;
|
||||
}
|
||||
};
|
||||
const onFullTableResize = ({ width }) => {
|
||||
clearTimeout(timtout);
|
||||
if (componentWidth.value === 0) {
|
||||
updateWidth(width);
|
||||
return;
|
||||
}
|
||||
timtout = setTimeout(() => {
|
||||
if (width !== componentWidth.value) {
|
||||
triggerOnScroll();
|
||||
componentWidth.value = fullTableRef.value ? fullTableRef.value.offsetWidth : width;
|
||||
}
|
||||
updateWidth(width);
|
||||
}, 100);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue