Skip to content

switch会触发两次 #3218

Description

@Ryan-CW-Code

NutUI React 包名

@nutui/nutui-react

NutUI React 版本号

3版本最新

平台

weapp

重现链接

重现步骤

taro的switch组件,点击时调用了两次onChange。
switch的逻辑可以优化一下,为什么不用您们封装过的usePropsValue来管理loading状态呢

Image

期望的结果是什么?

不触发两次

实际的结果是什么?

触发两次

环境信息

No response

其他补充信息

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions