arco-design-vue
arco-design-vue copied to clipboard
feat(calendar): add content slot to render schedule
trafficstars
Types of changes
- [x] New feature
- [ ] 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
Calendar组件如果通过default 插槽来实现日程(比如国定假日、节气、备注)的展示,会失去默认的日期点击事件。
https://github.com/arco-design/arco-design-vue/issues/3464
Solution
新增content插槽,实现日程展示,保留默认的日期展示与点击事件。
How is the change tested?
人工测试来保证新增的slot正常工作,不影响其他内容。
Changelog
| Component | Changelog(CN) | Changelog(EN) | Related issues |
|---|---|---|---|
Calendar |
新增 content 插槽 |
Added content slot |
Close https://github.com/arco-design/arco-design-vue/issues/3464 |
Checklist:
- [x] Test suite passes (
npm run test) - [x] Provide changelog for relevant changes (e.g. bug fixes and new features) if applicable.
- [x] Changes are submitted to the appropriate branch (e.g. features should be submitted to
featurebranch and others should be submitted tomainbranch)
Other information
这个PR能够让Calendar提供类似日程的功能,而保留默认的日期展示、事件点击,便于开发者使用
@oljc review下不?