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({
35
35
default : true ,
36
36
required : false ,
37
37
} ,
38
- key : {
38
+ /**
39
+ * index of the component.
40
+ */
41
+ index : {
39
42
type : Number ,
40
43
default : undefined ,
41
44
required : false ,
@@ -83,8 +86,8 @@ const CToast = defineComponent({
83
86
setTimeout ( ( ) => {
84
87
el . classList . add ( 'show' )
85
88
} , 1 )
86
- if ( props . key ) {
87
- emit ( 'show' , props . key )
89
+ if ( props . index ) {
90
+ emit ( 'show' , props . index )
88
91
} else {
89
92
emit ( 'show' )
90
93
}
@@ -100,8 +103,8 @@ const CToast = defineComponent({
100
103
}
101
104
const handleAfterLeave = ( el : RendererElement ) => {
102
105
el . classList . add ( 'hide' )
103
- if ( props . key ) {
104
- emit ( 'close' , props . key )
106
+ if ( props . index ) {
107
+ emit ( 'close' , props . index )
105
108
} else {
106
109
emit ( 'close' )
107
110
}
You can’t perform that action at this time.
0 commit comments