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

[bugfix] Slider: fix slider drag and value props change at the same time can not drag success #1553

Merged
merged 27 commits into from
Apr 23, 2019
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c1223e0
[improvement] Icon: add new icons
Oct 18, 2018
7e081be
Merge remote-tracking branch 'upstream/dev' into dev
Oct 24, 2018
45dbe1e
[improvement] Icon: optimize goods corner mark icon
Oct 24, 2018
4e29463
Merge remote-tracking branch 'upstream/dev' into dev
Oct 31, 2018
653abe4
[bugfix] Icon:修复商品角标icon兼容性问题
Oct 31, 2018
5652e7e
Merge remote-tracking branch 'upstream/dev' into dev
Nov 23, 2018
13bd683
[improvement] Tabs: add animated props to change tabs with animation
Nov 26, 2018
56b89c4
Merge remote-tracking branch 'upstream/dev' into dev
Nov 26, 2018
ce537b8
Tabs: readme and default duration
Nov 26, 2018
c365be0
Merge remote-tracking branch 'upstream/dev' into dev
Dec 3, 2018
0a0338f
[improvement] Tabs:support `swipeable` and `sticky` property
Dec 4, 2018
d62ad79
fix: tabs readme
Dec 4, 2018
268c118
fix: tab sticky
Dec 5, 2018
a0cdc53
fix: tabs touchmove event
Dec 5, 2018
ffb8b2a
Merge remote-tracking branch 'upstream/dev' into dev
Dec 7, 2018
a2a2fbd
[bugfix] Tabs:修复开启animated时导致的滚动问题
Dec 7, 2018
b77ab8a
Merge remote-tracking branch 'upstream/dev' into dev
Dec 17, 2018
1eed403
[Doc] NoticeBar
Dec 17, 2018
0754a6a
[bugfix] Tabs:修复tab使用transition导致的问题
Dec 18, 2018
eaee137
Merge remote-tracking branch 'upstream/dev' into dev
Jan 7, 2019
0631525
fix: optimize tabs sticky
Jan 8, 2019
cbf1a96
fix: tab readme and demo
Jan 8, 2019
e244163
Merge remote-tracking branch 'upstream/dev' into dev
Jan 15, 2019
a97c82d
fix: rollback tabs use IntersectionObserver to implement sticky
Jan 15, 2019
1b3e9cf
Merge remote-tracking branch 'upstream/dev' into dev
Apr 23, 2019
2e4d4c5
fix: 修复Slider组件拖拽移动时props变动导致的拖动bug问题
Apr 23, 2019
c81ccf5
fix: tab demo
Apr 23, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/slider/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,14 @@ VantComponent({
this.touchMove(event);
this.getRect('.van-slider').then((rect: wx.BoundingClientRectCallbackResult) => {
const diff = this.deltaX / rect.width * 100;
this.updateValue(this.startValue + diff, false, true);
this.newValue = this.startValue + diff;
this.updateValue(this.newValue, false, true);
});
},

onTouchEnd() {
if (this.data.disabled) return;
this.updateValue(this.data.value, true);
this.updateValue(this.newValue, true);
},

onClick(event: Weapp.TouchEvent) {
Expand Down