Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] DatePicker 和 TimePicker 需要 confirm 方法来停止滚动 #12711

Closed
bluesky335 opened this issue Mar 22, 2024 · 3 comments

Comments

@bluesky335
Copy link
Contributor

这个功能解决了什么问题?

Picker 组件有 confirm 方法,可以停止惯性滚动并触发 confirm 事件
但是 DatePicker 和 TimePicker 却没有。
同样的,PickerGroup 也需要一个一样的方法。

你期望的 API 是什么样子的?

<van-date-picker
            ref="vanDatePicker"
            :columns-type="['year', 'month', 'day']"
            visible-item-count="5"
            :show-toolbar="false"
            v-model="currentDate"
          />
<van-time-picker 
           ref="vanTimePicker" 
           v-model="currentTime" 
           :formatter="formatter"
          />
const vanDatePicker = ref()
const vanTimePicker = ref()
// ......
vanDatePicker.value.confirm()
vanTimePicker.value.confirm()
Copy link

Hello @bluesky335. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to main branch, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!

你好 @bluesky335,我们完全同意你的提议/反馈,欢迎直接在此仓库 创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到 main 分支,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待你的贡献。

@CatsAndMice
Copy link
Contributor

我来看看

@bluesky335
Copy link
Contributor Author

我来看看

@CatsAndMice 其实我周末已经写完了,哈哈。还没提交。自己动手丰衣足食😏。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants