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

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

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

FairyYang
Copy link
Collaborator

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

@eternalsky eternalsky changed the base branch from master to next October 9, 2024 08:39
@eternalsky eternalsky linked an issue Oct 9, 2024 that may be closed by this pull request
@eternalsky
Copy link
Contributor

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

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

@FairyYang
Copy link
Collaborator Author

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

@eternalsky
Copy link
Contributor

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

以实际的实现逻辑为准

components/time-picker2/__docs__/demo/preset/index.tsx Outdated Show resolved Hide resolved
components/time-picker2/__docs__/demo/step/index.tsx Outdated Show resolved Hide resolved
components/time-picker2/__docs__/index.en-us.md Outdated Show resolved Hide resolved
components/time-picker2/__docs__/index.en-us.md Outdated Show resolved Hide resolved
components/time-picker2/__docs__/index.en-us.md Outdated Show resolved Hide resolved
components/time-picker2/time-picker.tsx Outdated Show resolved Hide resolved
components/time-picker2/time-picker.tsx Show resolved Hide resolved
components/time-picker2/time-picker.tsx Outdated Show resolved Hide resolved
components/time-picker2/types.ts Outdated Show resolved Hide resolved
components/time-picker2/types.ts Outdated Show resolved Hide resolved
components/time-picker2/types.ts Show resolved Hide resolved
components/time-picker2/types.ts Show resolved Hide resolved
components/time-picker2/types.ts Show resolved Hide resolved
components/time-picker2/module/date-input.tsx Outdated Show resolved Hide resolved
components/time-picker2/module/date-input.tsx Outdated Show resolved Hide resolved
components/time-picker2/module/date-input.tsx Outdated Show resolved Hide resolved
components/time-picker2/module/date-input.tsx Outdated Show resolved Hide resolved
components/time-picker2/panel.tsx Outdated Show resolved Hide resolved
components/time-picker2/time-picker.tsx Outdated Show resolved Hide resolved
components/time-picker2/time-picker.tsx Outdated Show resolved Hide resolved
components/time-picker2/time-picker.tsx Outdated Show resolved Hide resolved
components/time-picker2/time-picker.tsx Outdated Show resolved Hide resolved
components/time-picker2/types.ts Outdated Show resolved Hide resolved
@FairyYang FairyYang force-pushed the refactor-ts-timepicker2 branch 2 times, most recently from 30e2760 to 7006e77 Compare October 17, 2024 03:30
components/time-picker2/time-picker.tsx Outdated Show resolved Hide resolved
components/time-picker2/module/date-input.tsx Outdated Show resolved Hide resolved
components/time-picker2/time-picker.tsx Show resolved Hide resolved
@FairyYang
Copy link
Collaborator Author

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

@FairyYang FairyYang reopened this Oct 21, 2024
Copy link
Contributor

@eternalsky eternalsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eternalsky eternalsky merged commit 00456e2 into alibaba-fusion:next Oct 21, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

【Technical upgrade】TimePicker2
2 participants