tdesign-react icon indicating copy to clipboard operation
tdesign-react copied to clipboard

[Switch] 值类型定义

Open richerfu opened this issue 2 years ago • 3 comments

tdesign-react 版本

0.38.0

重现链接

No response

重现步骤

图片

Switch的值是否有必要做成string | number | boolean

如果考虑value自定义类型 是否通过泛型实现更优雅?大部分业务场景 都只需要一个boolean类型

如这种代码 很容易就出现TS错误 图片

强制类型对业务成本改造过高

期望结果

No response

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

richerfu avatar Aug 09 '22 07:08 richerfu

👋 @southorange1228,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

github-actions[bot] avatar Aug 09 '22 07:08 github-actions[bot]

♥️ 有劳 @gedy @maidishike @haishancai 尽快确认问题。 确认有效后将下一步计划和可能需要的时间回复给 @southorange1228 。

github-actions[bot] avatar Aug 09 '22 07:08 github-actions[bot]

输入框相关组件类型支持范型,已在规划中

chaishi avatar Aug 10 '22 02:08 chaishi

这个 Issue 被标记为了过时 stale ,因为它已经持续 30 天没有任何活动了。删除 stale 标签或评论,否则将在 7 天内关闭。

github-actions[bot] avatar Sep 09 '22 06:09 github-actions[bot]

此 Issue 被自动关闭,因为它自被标记为过时 stale 以来已闲置 7 天。

github-actions[bot] avatar Sep 16 '22 06:09 github-actions[bot]

此 Issue 被自动关闭,因为它自被标记为过时 stale 以来已闲置 7 天。

github-actions[bot] avatar Oct 05 '22 06:10 github-actions[bot]