mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-27 02:01:15 +08:00
fix(components): [tag] leave animations not working (#18006)
* fix(components): [tag] leave animations not working * use @vue:mounted to ensure forward compatibility with Vue Co-authored-by: btea <2356281422@qq.com> --------- Co-authored-by: btea <2356281422@qq.com>
This commit is contained in:
parent
e48eec1c58
commit
be23e0ccb6
@ -12,7 +12,12 @@
|
||||
<Close />
|
||||
</el-icon>
|
||||
</span>
|
||||
<transition v-else :name="`${ns.namespace.value}-zoom-in-center`" appear>
|
||||
<transition
|
||||
v-else
|
||||
:name="`${ns.namespace.value}-zoom-in-center`"
|
||||
appear
|
||||
@vue:mounted="handleVNodeMounted"
|
||||
>
|
||||
<span
|
||||
:class="containerKls"
|
||||
:style="{ backgroundColor: color }"
|
||||
@ -36,6 +41,7 @@ import { useNamespace } from '@element-plus/hooks'
|
||||
import { useFormSize } from '@element-plus/components/form'
|
||||
|
||||
import { tagEmits, tagProps } from './tag'
|
||||
import type { VNode } from 'vue'
|
||||
|
||||
defineOptions({
|
||||
name: 'ElTag',
|
||||
@ -66,4 +72,9 @@ const handleClose = (event: MouseEvent) => {
|
||||
const handleClick = (event: MouseEvent) => {
|
||||
emit('click', event)
|
||||
}
|
||||
|
||||
const handleVNodeMounted = (vnode: VNode) => {
|
||||
// @ts-ignore
|
||||
vnode.component.subTree.component.bum = null
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user