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