We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76cd392 commit ddbf476Copy full SHA for ddbf476
src/components/toast/CToastHeader.ts
@@ -12,19 +12,19 @@ const CToastHeader = defineComponent({
12
require: false,
13
},
14
15
+ emits: [
16
+ /**
17
+ * Event called after clicking the close button.
18
+ */
19
+ 'close',
20
+ ],
21
setup(props, { slots, emit }) {
- const handleClose = () => {
- /**
- * Event called after clicking the close button.
- */
- emit('close')
- }
22
return () =>
23
h('div', { class: 'toast-header' }, [
24
slots.default && slots.default(),
25
props.closeButton &&
26
h(CToastClose, {
27
- onClose: () => handleClose(),
+ onClose: () => emit('close'),
28
}),
29
])
30
0 commit comments