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

[Tab]组件onChange支持泛型 #4960

Open
Kido-200 opened this issue Oct 31, 2024 · 2 comments
Open

[Tab]组件onChange支持泛型 #4960

Kido-200 opened this issue Oct 31, 2024 · 2 comments

Comments

@Kido-200
Copy link

Component

Tab

Feature Description

使用泛型来读取tabItems的key,并将该类型作为onChange的params类型返回

导致的问题:
如下图,我的activeKey是一个string枚举,直接在onChange中使用就会报错,迫使我只能写成setActiveKey(v as ProductLineTabKey) image

Copy link

这是您为 Fusion/Next 提的第一个 issue,感谢您对 Fusion 的信任和支持,我们会尽快进行处理。

@eternalsky
Copy link
Contributor

你把 v 指定成 ProductionTabKey 即可

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

No branches or pull requests

2 participants