tusen-ai / naive-ui

A Vue 3 Component Library. Fairly Complete. Theme Customizable. Uses TypeScript. Fast.
https://www.naiveui.com
MIT License
15.61k stars 1.64k forks source link

希望月份选择器在选择月份之后能自动关闭面板 #5786

Open adele-ty opened 4 months ago

adele-ty commented 4 months ago

问题的清晰而简明的描述

<n-date-picker v-model:value="timestamp" type="month" update-value-on-close :actions="null" @update:value="(e, value) => handleMonth(value)" /> 当type为month时,选择月份之后需要点击页面的其他部分,月份选择器才会收起面板

建议的解决方案

希望可以添加一个prop,类似于DateRange中的close-on-select属性

备选方案

No response

附加上下文

No response

验证

18626428291 commented 3 months ago

附议,并且其 例如类型是date或者datetime的时候,希望选择年和月都会自动收起内部的面板,现在需要点击内部面板和外部面板之间的区域才能收起内部面板,有点影响操作

Chenfangrong8810 commented 1 month ago

很急,我的用户也因为这个困惑, 这个月份小面板目前没有控参数与事件,