Skip to content

Commit

Permalink
fix: slider组件change事件传参
Browse files Browse the repository at this point in the history
  • Loading branch information
jry committed Dec 26, 2024
1 parent 5a4e5c8 commit f875cbc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/uni_modules/uview-plus/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 3.3.58(2024-12-26)
fix: slider组件change事件传参

## 3.3.57(2024-12-23)
fix: slider组件change事件传参

Expand Down
6 changes: 3 additions & 3 deletions src/uni_modules/uview-plus/components/u-slider/u-slider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
this.newValue = ((this.distanceX / this.sliderRect.width) * (this.max - this.min)) + parseFloat(this.min);
this.status = 'moving';
// 发出moving事件
$crtFmtValue = this.updateValue(this.newValue, true, index);
let $crtFmtValue = this.updateValue(this.newValue, true, index);
this.$emit('changing', $crtFmtValue);
},
onTouchMove(event, index = 1) {
Expand All @@ -293,13 +293,13 @@
this.newValue = ((this.distanceX / this.sliderRect.width) * (this.max - this.min)) + parseFloat(this.min);
this.status = 'moving';
// 发出moving事件
$crtFmtValue = this.updateValue(this.newValue, true, index);
let $crtFmtValue = this.updateValue(this.newValue, true, index);
this.$emit('changing', $crtFmtValue);
},
onTouchEnd(event, index = 1) {
if (this.disabled) return;
if (this.status === 'moving') {
$crtFmtValue = this.updateValue(this.newValue, false, index);
let $crtFmtValue = this.updateValue(this.newValue, false, index);
this.$emit('change', $crtFmtValue);
}
this.status = 'end';
Expand Down
2 changes: 1 addition & 1 deletion src/uni_modules/uview-plus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "uview-plus",
"name": "uview-plus",
"displayName": "零云®uview-plus3.0重磅发布,全面的Vue3鸿蒙移动组件库。",
"version": "3.3.57",
"version": "3.3.58",
"description": "零云®uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
"keywords": [
"uview",
Expand Down

0 comments on commit f875cbc

Please sign in to comment.