-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
[Carbon] *-Picker 重构 #7367
[Carbon] *-Picker 重构 #7367
Conversation
This reverts commit 1912c47.
range: n => Array modify{Date, Time}: Date => Date clear{Time, Milliseconds}: Date => Date limitTimeRange: Date => Date timeWithinRange: Date, [Date] => Boolean
简直棒。似乎可以更新下文档,比如加个 |
7e510b5
to
e230f26
Compare
文档更新了。 非兼容改动 +1 :change 事件发射组件绑定值(同 input 事件),而不是格式化后的值。(可被 value-format 控制) |
this.oldHours = this.hours; | ||
this.oldMinutes = this.minutes; | ||
this.oldSeconds = this.seconds; | ||
this.oldValue = this.value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wacky6 发现一个 bug:https://jsfiddle.net/u1056zx4/ ,重现步骤:
- 打开面板,随便选择一个日期,点击确定
- 再次打开面板,然后打开时间选择下拉框,点击取消,控制台会报错
点击取消会回到之前的值,即 this.oldValue
,这里赋值时 this.value
是空字符串。大概看了一下,this.value
似乎一直都是空字符串。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pr #7442
@wacky6 发现了一个 我是把 PhantomJS 换成 Chrome 跑测试的时候发现的,PhantomJS 竟然通过了那个用例= = |
似乎是我当时写测试的时候没有写的非常严格。 |
大规模重构 *-Picker
内部实现简化:
default-value 改进 (non breaking change)
[实验性] 新增 value-format (non breaking change)
'2017-10-01'
['2017-10-01', '2017-10-02']
2017年10月
breaking change
通过程序修改 picker 绑定值为无效值(disabledDate、selectableRange之外),打开 picker 时不会自动修正
远期改进预留 和 TODO
date-range:左右面板日期 leftDate、rightDate 独立:远期考虑#6935
date-table:重构,解决夏令时/冬令时的问题,#6214
先这样吧。
carbon alpha/beta 众测看看效果(滑稽
下周一大波 deadline 来袭(逃