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

Stepper 组件点击增加/减少按钮时触发的方法 #6773

Open
Ymm0008 opened this issue Oct 29, 2024 · 5 comments
Open

Stepper 组件点击增加/减少按钮时触发的方法 #6773

Ymm0008 opened this issue Oct 29, 2024 · 5 comments
Labels

Comments

@Ymm0008
Copy link

Ymm0008 commented Oct 29, 2024

Version of antd-mobile

5.36.1

What is this feature about?

Snipaste_2024-10-29_22-13-50

@zombieJ
Copy link
Member

zombieJ commented Oct 30, 2024

为什么要和输入区分开呀?

@Layouwen
Copy link
Member

@Ymm0008 可以描述一下需求和使用场景吗?
目前理解的意思, 你好像是想手动调用增减的操作.
但是这个应该可以直接调整 value 值实现相同效果, value + 步长.
不清楚什么场景需要手动调用

@Ymm0008
Copy link
Author

Ymm0008 commented Nov 5, 2024

您好,我的场景是这样的:
1、在手动输入的时候,期望是失焦触发接口,这里用到onBlur
2、再点击左右符号操作时,获取value只能用onchange接受
3、用onchange接收的话,就会导致onBlur时也会触发,2个业务场景重叠了
@zombieJ @Layouwen

@Layouwen
Copy link
Member

Layouwen commented Nov 5, 2024

方便提供一个最小demo看看你的用法么
以及可以加一下钉钉社区群:33155754

@zombieJ
Copy link
Member

zombieJ commented Nov 5, 2024

这个听起来搞个 raf 来做 debounce 也够了?

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

No branches or pull requests

3 participants