feat(Calendar): add click-subtitle event (#8981)

This commit is contained in:
neverland
2021-07-05 13:25:58 +08:00
committed by GitHub
parent 779f3363c2
commit b5ea1cd3ad
5 changed files with 34 additions and 3 deletions
+5 -1
View File
@@ -115,8 +115,9 @@ export default defineComponent({
'confirm',
'unselect',
'month-show',
'update:show',
'over-range',
'update:show',
'click-subtitle',
],
setup(props, { emit, slots }) {
@@ -495,6 +496,9 @@ export default defineComponent({
showTitle={props.showTitle}
showSubtitle={props.showSubtitle}
firstDayOfWeek={dayOffset.value}
onClick-subtitle={(event: MouseEvent) => {
emit('click-subtitle', event);
}}
/>
<div ref={bodyRef} class={bem('body')} onScroll={onScroll}>
{months.value.map(renderMonth)}