@@ -2,6 +2,7 @@ import { getTransitionGroupProps } from '../_util/transition';
2
2
import type { Key , VueNode } from '../_util/type' ;
3
3
import type { CSSProperties } from 'vue' ;
4
4
import {
5
+ toRaw ,
5
6
shallowRef ,
6
7
createVNode ,
7
8
computed ,
@@ -72,10 +73,10 @@ type NotificationState = {
72
73
holderCallback ?: HolderReadyCallback ;
73
74
} [ ] ;
74
75
75
- const Notification = defineComponent < NotificationProps > ( {
76
+ const Notification = defineComponent ( {
76
77
name : 'Notification' ,
77
78
inheritAttrs : false ,
78
- props : [ 'prefixCls' , 'transitionName' , 'animation' , 'maxCount' , 'closeIcon' , 'hashId' ] as any ,
79
+ props : [ 'prefixCls' , 'transitionName' , 'animation' , 'maxCount' , 'closeIcon' , 'hashId' ] ,
79
80
setup ( props , { attrs, expose, slots } ) {
80
81
const hookRefs = new Map < Key , HTMLDivElement > ( ) ;
81
82
const notices = ref < NotificationState > ( [ ] ) ;
@@ -125,7 +126,7 @@ const Notification = defineComponent<NotificationProps>({
125
126
} ;
126
127
127
128
const remove = ( removeKey : Key ) => {
128
- notices . value = notices . value . filter ( ( { notice : { key, userPassKey } } ) => {
129
+ notices . value = toRaw ( notices . value as any ) . filter ( ( { notice : { key, userPassKey } } ) => {
129
130
const mergedKey = userPassKey || key ;
130
131
return mergedKey !== removeKey ;
131
132
} ) ;
0 commit comments