File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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>
Original file line number Diff line number Diff line change 1- import { MOUNTED } from '@mpxjs/core' ;
21import { createComponent } from '../../common/helper/create-component' ;
32const EVENT_CHANGE = 'change' ; // 完成一次拖动后触发的事件
43const 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
Original file line number Diff line number Diff line change 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" : {
You can’t perform that action at this time.
0 commit comments