File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
packages/coreui-vue/src/components/toast Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,10 @@ const CToast = defineComponent({
3535 default : true ,
3636 required : false ,
3737 } ,
38- key : {
38+ /**
39+ * index of the component.
40+ */
41+ index : {
3942 type : Number ,
4043 default : undefined ,
4144 required : false ,
@@ -83,8 +86,8 @@ const CToast = defineComponent({
8386 setTimeout ( ( ) => {
8487 el . classList . add ( 'show' )
8588 } , 1 )
86- if ( props . key ) {
87- emit ( 'show' , props . key )
89+ if ( props . index ) {
90+ emit ( 'show' , props . index )
8891 } else {
8992 emit ( 'show' )
9093 }
@@ -100,8 +103,8 @@ const CToast = defineComponent({
100103 }
101104 const handleAfterLeave = ( el : RendererElement ) => {
102105 el . classList . add ( 'hide' )
103- if ( props . key ) {
104- emit ( 'close' , props . key )
106+ if ( props . index ) {
107+ emit ( 'close' , props . index )
105108 } else {
106109 emit ( 'close' )
107110 }
You can’t perform that action at this time.
0 commit comments