mirror of
https://github.com/element-plus/element-plus.git
synced 2025-02-11 11:39:43 +08:00
fix(components): [table] fixed column style when lazyload title (#19020)
This commit is contained in:
parent
8df0d61f38
commit
a2f43777c3
@ -6,7 +6,9 @@ import {
|
||||
inject,
|
||||
nextTick,
|
||||
onMounted,
|
||||
reactive,
|
||||
ref,
|
||||
watch,
|
||||
} from 'vue'
|
||||
import ElCheckbox from '@element-plus/components/checkbox'
|
||||
import { useNamespace } from '@element-plus/hooks'
|
||||
@ -69,7 +71,7 @@ export default defineComponent({
|
||||
const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent!)
|
||||
|
||||
const isTableLayoutAuto = parent?.props.tableLayout === 'auto'
|
||||
const saveIndexSelection = new Map()
|
||||
const saveIndexSelection = reactive(new Map())
|
||||
const theadRef = ref()
|
||||
|
||||
const updateFixedColumnStyle = () => {
|
||||
@ -89,6 +91,8 @@ export default defineComponent({
|
||||
})
|
||||
}
|
||||
|
||||
watch(saveIndexSelection, updateFixedColumnStyle)
|
||||
|
||||
onMounted(async () => {
|
||||
// Need double await, because updateColumns is executed after nextTick for now
|
||||
await nextTick()
|
||||
|
Loading…
Reference in New Issue
Block a user