arco-design-vue
arco-design-vue copied to clipboard
fix(time-picker): remove the default value of the size prop
Types of changes
- [ ] New feature
- [x] Bug fix
- [ ] Enhancement
- [ ] Component style change
- [ ] Typescript definition change
- [ ] Documentation change
- [ ] Coding style change
- [ ] Refactoring
- [ ] Test cases
- [ ] Continuous integration
- [ ] Breaking change
- [ ] Others
Background and context
#1509
Solution
How is the change tested?
Changelog
Component | Changelog(CN) | Changelog(EN) | Related issues |
---|---|---|---|
time-picker | 修复 time-picker size 的默认值 | fix time-picker default size | #1509 |
Checklist:
- [ ] Test suite passes (
npm run test
) - [ ] Provide changelog for relevant changes (e.g. bug fixes and new features) if applicable.
- [ ] Changes are submitted to the appropriate branch (e.g. features should be submitted to
feature
branch and others should be submitted tomain
branch)
Other information
@kkkisme 😅 抱歉,我先前没看 useFormItem 的实现。这里不需要这么复杂,是 size 默认参数的问题。
-
删除 default 参数(不需要,内部组件 size hook 会处理默认值) https://github.com/arco-design/arco-design-vue/blob/f3db85c5df656c2959e491181e2821ff0a644b75/packages/web-vue/components/time-picker/time-picker.vue#L200-L205
-
在 form demo 文件中补充 time-picker 的例子 https://github.com/arco-design/arco-design-vue/blob/f3db85c5df656c2959e491181e2821ff0a644b75/packages/web-vue/components/form/demo/validation.md?plain=1#L61-L69
<a-form-item field="date" label="Date">
···
<a-form-item field="time" label="Time">
<a-time-picker v-model="form.time" placeholder="Please select ..."/>
</a-form-item>
···

就可以了 😊
@kkkisme 🥰,麻烦把 commit 整理成一个,提交一下,方便 pr 的归档 🤝 (也可关了这个pr,再提交一个新的😊,pr名称建议使用 fix-date-picker-default-size)
@kkkisme 🥰,麻烦把 commit 整理成一个,提交一下,方便 pr 的归档 🤝 (也可关了这个pr,再提交一个新的😊,pr名称建议使用 fix-date-picker-default-size)
👌