@@ -2,6 +2,7 @@ import { getTransitionGroupProps } from '../_util/transition';
22import type { Key , VueNode } from '../_util/type' ;
33import type { CSSProperties } from 'vue' ;
44import {
5+ toRaw ,
56 shallowRef ,
67 createVNode ,
78 computed ,
@@ -72,10 +73,10 @@ type NotificationState = {
7273 holderCallback ?: HolderReadyCallback ;
7374} [ ] ;
7475
75- const Notification = defineComponent < NotificationProps > ( {
76+ const Notification = defineComponent ( {
7677 name : 'Notification' ,
7778 inheritAttrs : false ,
78- props : [ 'prefixCls' , 'transitionName' , 'animation' , 'maxCount' , 'closeIcon' , 'hashId' ] as any ,
79+ props : [ 'prefixCls' , 'transitionName' , 'animation' , 'maxCount' , 'closeIcon' , 'hashId' ] ,
7980 setup ( props , { attrs, expose, slots } ) {
8081 const hookRefs = new Map < Key , HTMLDivElement > ( ) ;
8182 const notices = ref < NotificationState > ( [ ] ) ;
@@ -125,7 +126,7 @@ const Notification = defineComponent<NotificationProps>({
125126 } ;
126127
127128 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 } } ) => {
129130 const mergedKey = userPassKey || key ;
130131 return mergedKey !== removeKey ;
131132 } ) ;
0 commit comments