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

feat(calendar): multiple-selected-state #5783

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

KumaXR
Copy link

@KumaXR KumaXR commented May 8, 2024

为multiple类型添加多个选中态功能

可以通过传入selectedStateCount设置选中态的数量
例如当selectedStateCount = 2时,点击日期效果为:
选中态1 --> 选中态2 --> 取消选中

新增Day属性

  • selectedState (number):表示该日期的选中状态,非multiple、disabled、未选中时都为0

新增Multiple Props

  • selectedStateCount (number):选中态的数量,默认为1
  • extraColors (string[]):备用color,如果有传入,会作为选中态索引大于1的日期的背景色
  • defaultDateSelectedState (number[]):选中的日期的选中态

新增Multiple Event

-selectedStateChange:日期的选中态变化时触发,event.detail = { date, state }

更新Multiple Event
-confirm:当type为multiple时,event.detail = { date: Date[], state: number[] }

新增日期view class
-selected-state-{{ item.selectedState }}:可据此自定义样式

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