mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-27 02:01:15 +08:00
fix(components): [table] cancel layout update when component unmount (#18440)
This commit is contained in:
parent
86b01eed9f
commit
27e0c496e8
@ -169,7 +169,13 @@
|
||||
|
||||
<script lang="ts">
|
||||
// @ts-nocheck
|
||||
import { computed, defineComponent, getCurrentInstance, provide } from 'vue'
|
||||
import {
|
||||
computed,
|
||||
defineComponent,
|
||||
getCurrentInstance,
|
||||
onBeforeUnmount,
|
||||
provide,
|
||||
} from 'vue'
|
||||
import { debounce } from 'lodash-unified'
|
||||
import { Mousewheel } from '@element-plus/directives'
|
||||
import { useLocale, useNamespace } from '@element-plus/hooks'
|
||||
@ -305,6 +311,10 @@ export default defineComponent({
|
||||
|
||||
useKeyRender(table)
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
debouncedUpdateLayout.cancel()
|
||||
})
|
||||
|
||||
return {
|
||||
ns,
|
||||
layout,
|
||||
|
Loading…
Reference in New Issue
Block a user