Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ddbf476

Browse filesBrowse files
committed
refactor(CToastHeader): improve syntax
1 parent 76cd392 commit ddbf476
Copy full SHA for ddbf476

File tree

Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed

‎src/components/toast/CToastHeader.ts

Copy file name to clipboardExpand all lines: src/components/toast/CToastHeader.ts
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ const CToastHeader = defineComponent({
1212
require: false,
1313
},
1414
},
15+
emits: [
16+
/**
17+
* Event called after clicking the close button.
18+
*/
19+
'close',
20+
],
1521
setup(props, { slots, emit }) {
16-
const handleClose = () => {
17-
/**
18-
* Event called after clicking the close button.
19-
*/
20-
emit('close')
21-
}
2222
return () =>
2323
h('div', { class: 'toast-header' }, [
2424
slots.default && slots.default(),
2525
props.closeButton &&
2626
h(CToastClose, {
27-
onClose: () => handleClose(),
27+
onClose: () => emit('close'),
2828
}),
2929
])
3030
},

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.