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): add over-range event #4212

Merged
merged 5 commits into from
May 19, 2021

Conversation

nemo-shen
Copy link
Collaborator

#4181

  • forbid range-prompt toast when range-prompt prop is null
  • emit over-range event when dateRange > maxRange

nemo-shen added 2 commits May 14, 2021 00:38
- forbid range-prompt toast when range-prompt is null
- emit over-range event when dateRange > maxRange
@nemo-shen
Copy link
Collaborator Author

关于禁止显示默认toast,另一种方式是定义一个propshow-range-prompt: Boolean

  • 考虑到默认range-prompt不传为"",如果开发者手动设置为null,则没有弹出toast的必要,优点是通过原有prop就能判断是否禁止toast,缺点是后续扩展性和表达能力没有prop好,也许null会有其他作用。
  • 如果设置prop,优点是更好的语义表达,缺点是需要增加了一个作用比较有限的prop

@chenjiahan chenjiahan merged commit 0d08ec1 into youzan:dev May 19, 2021
@chenjiahan
Copy link
Member

辛苦~ Vant 也可以提一个相同的 PR 喔

@nemo-shen nemo-shen deleted the feature/calendar_over-range_0514 branch May 19, 2021 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants