alibaba-fusion / next

🦍 A configurable component library for web built on React.
https://fusion.design
MIT License
4.59k stars 591 forks source link

refactor(TimePicker2): convert to TypeScript, impove docs and tests, close #4616 #4949

Closed FairyYang closed 4 weeks ago

FairyYang commented 1 month ago

遇到个问题,当type: range时,disabledHours 需要返回number[],panel的代码逻辑是这么实现的。实际使用过,确实如此。

eternalsky commented 1 month ago

遇到个问题,当type: range时,disabledHours 需要返回number[],panel的代码逻辑是这么实现的。实际使用过,确实如此。

这个只是描述一个事实,问题是什么?

FairyYang commented 1 month ago

问题是,disabledHours在旧的doc里,类型是 (index?: number) => boolean,新增的类型是:(index?: number) => boolean | number[]

eternalsky commented 1 month ago

问题是,disabledHours在旧的doc里,类型是 (index?: number) => boolean,新增的类型是:(index?: number) => boolean | number[]

以实际的实现逻辑为准

FairyYang commented 1 month ago

针对最后一个问题的回复:handleChange 里 v 不可以是 string,在VSCODE里,没有as ValueType,不会报错。