ant-design-vue icon indicating copy to clipboard operation
ant-design-vue copied to clipboard

3.x的timepicker组件需要加上needConfirm属性

Open stevefoxuser opened this issue 1 year ago • 2 comments
trafficstars

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

antd5.14版本都加上了,antdv不准备加吗?2.x的设计不挺好吗选了时间model就改了,非要点个确定干啥?

What does the proposed API look like?

3.x的timepicker组件需要加上needConfirm属性,像antd一样

stevefoxuser avatar Apr 30 '24 03:04 stevefoxuser

给其他人看的如果你们也遇到了这个问题,我目前的解决方案是这样的 <a-time-picker format="HH:mm" v-model:value="pickedTime" @openChange="changeTimePoint" />

const changeTimePoint = function (isOpen:boolean) { if(isOpen)return const inputs = document.querySelectorAll( '.ant-picker-time-panel-cell-selected .ant-picker-time-panel-cell-inner' ) const h = inputs[0]?.innerHTML const m = inputs[1]?.innerHTML if (h && m) { pickedTime.value = dayjs('2024-01-01 ' + h + ':' + m) }else{ console.error('An error occurred when picking a time.') } }

stevefoxuser avatar Apr 30 '24 03:04 stevefoxuser

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Jun 30 '24 02:06 github-actions[bot]