Skip to content

Commit 6cca967

Browse files
committed
chore: 1.4.12.beta.1
1 parent 00e3838 commit 6cca967

3 files changed

Lines changed: 11 additions & 7 deletions

File tree

packages/mpx-cube-ui/lib/components/slider/index.mpx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
capture-catch:touchend="endHandler"
1919
>
2020
<!-- 滑块儿 -->
21-
<view class="cube-slider-thumb-custom" wx:style="{{ { display: customContent ? '' : 'none', ...thumbStyle } }}">
21+
<view class="cube-slider-thumb-custom" wx:style="{{ thumbCustomStyle }}">
2222
<!-- 自定义滑块儿 -->
2323
<slot></slot>
2424
</view>

packages/mpx-cube-ui/lib/components/slider/slider.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { MOUNTED } from '@mpxjs/core';
21
import { createComponent } from '../../common/helper/create-component';
32
const EVENT_CHANGE = 'change'; // 完成一次拖动后触发的事件
43
const EVENT_CHANGING = 'changing'; // 拖动过程中触发的事件
@@ -106,10 +105,12 @@ createComponent({
106105
immediate: true
107106
}
108107
},
109-
[MOUNTED]() {
110-
this.getRect().then(res => {
111-
this.startDragRect = res;
112-
});
108+
lifetimes: {
109+
ready() {
110+
this.getRect().then(res => {
111+
this.startDragRect = res;
112+
});
113+
}
113114
},
114115
computed: {
115116
sliderClass() {
@@ -154,6 +155,9 @@ createComponent({
154155
}
155156
return style;
156157
},
158+
thumbCustomStyle() {
159+
return { display: this.customContent ? '' : 'none', ...this.thumbStyle };
160+
},
157161
trackStyle() {
158162
const style = {
159163
backgroundColor: this.backgroundColor || this.color

packages/mpx-cube-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mpxjs/mpx-cube-ui",
3-
"version": "1.4.12-beta.0",
3+
"version": "1.4.12-beta.1",
44
"description": "mpx components library",
55
"author": "xiaolei <xiaolei@didichuxing.com>",
66
"publishConfig": {

0 commit comments

Comments
 (0)