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

slider组件 step 是小数时change的value 存在精度丢失 #5444

Closed
spadek-w opened this issue Jun 19, 2023 · 1 comment
Closed

slider组件 step 是小数时change的value 存在精度丢失 #5444

spadek-w opened this issue Jun 19, 2023 · 1 comment

Comments

@spadek-w
Copy link

重现链接

<van-slider 
    range  
    max="10.0"
    min=" 4.0"
    step="0.1"
    value="{{ [4.0, 10.0] }}"
    bind:change="sliderChange" 
  />
  
  
sliderChange( { detail } ) {
    console.log(detail );  // [ 3.8000000000000003, 5.0 ]
}

Vant Weapp 版本

1.10.19

描述一下你遇到的问题。

<van-slider 
    range  
    max="10.0"
    min=" 4.0"
    step="0.1"
    value="{{ [4.0, 10.0] }}"
    bind:change="sliderChange" 
  />
  
  
sliderChange( { detail } ) {
    console.log(detail );  // [ 3.8000000000000003, 5.0 ]
}

重现步骤

随意滑动

设备/浏览器

No response

@landluck
Copy link
Contributor

landluck commented Jul 3, 2023

v1.10.20 已修复

@landluck landluck closed this as completed Jul 3, 2023
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