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

[comp:slider] 当可调整范围较小时,点击和拖拽都无法修改值 #817

Closed
1 task done
danranVm opened this issue Mar 22, 2022 · 3 comments · Fixed by #818
Closed
1 task done

[comp:slider] 当可调整范围较小时,点击和拖拽都无法修改值 #817

danranVm opened this issue Mar 22, 2022 · 3 comments · Fixed by #818
Assignees

Comments

@danranVm
Copy link
Member

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

https://codesandbox.io/s/cool-buck-hzlgff?file=/src/Demo.vue

Steps to reproduce

无论是点击还是拖动,都有明显异常。

What is expected?

可以通过点击或者拖拽来调整值

What is actually happening?

点击和拖动,都无法调整值

Environment Info

  Browsers:
    Edge: 99.0.1150.46
  npmPackages:
    @idux/cdk: latest => 1.0.0-beta.2
    @idux/components: latest => 1.0.0-beta.2
    @idux/pro: latest => 1.0.0-beta.2
    vue: next => 3.2.31

个人猜测是可调整范围较小导致的

@idux-bot
Copy link

idux-bot bot commented Mar 22, 2022

Translation of this issue:

[COMP: SLIDER] When the adjustable range is small, click and drag and drop can't modify the value.

  • i Have Searched The [https://github.com/iduxfe/idux/issues) of this repository and believe That this is not a duplicate.

reproduction link

https://codesandbox.io/s/cool-buck-hzlgff?file=/src/demo.vue

steps to reproduce

Whether it is clicking or dragging, there is obvious exception.

What is expected?

You can adjust the value by clicking or dragging.

What is actually happens?

Click and drag, you can't adjust the value.

Environment Info

  Browsers:
    Edge: 99.0.1150.46
  npmPackages:
    @idux/cdk: latest => 1.0.0-beta.2
    @idux/components: latest => 1.0.0-beta.2
    @idux/pro: latest => 1.0.0-beta.2
    vue: next => 3.2.31

Personal guess is a small adjustable range

@imguolao
Copy link
Contributor

min 不是从 0 开始导致的,我猜是计算距离的时候没有用 props.max + props.min,而是直接用 props.max,导致少计算了 200 的距离。

@imguolao
Copy link
Contributor

imguolao commented Mar 22, 2022

计算距离也没有考虑到 min, max正数 | 负数 的问题

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

Successfully merging a pull request may close this issue.

2 participants