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

xNumber组件有个bug #1459

Closed
yongyu2017 opened this issue May 23, 2017 · 0 comments
Closed

xNumber组件有个bug #1459

yongyu2017 opened this issue May 23, 2017 · 0 comments

Comments

@yongyu2017
Copy link

yongyu2017 commented May 23, 2017

<x-number` :name="123123" :min="0" :max="10" :step="2" value="3" :title="123213" `fillable></x-number>

如这段代码,如果设置最小值为0的时候,step步长为2,value值设置为3,当点到值最小会点到-1而不是0。。我看了露珠的判断条件,当this.currentValue值小于this.min的时候,如果设置最小值为0的时候,走不进去这判断条件里面,

if (this.min && this.currentValue < this.min) {
  this.currentValue = this.min
}

这判断条件会为0而不是true。然后我自己改成这样是可以用的,

if ((this.min!= undefined) && this.currentValue < this.min) {
  this.currentValue = this.min
}

望露珠修复下。。

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

No branches or pull requests

1 participant