@tplc/wot 0.1.51 → 0.1.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.1.52](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.51...v0.1.52) (2025-01-05)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * 调整rate 数据类型 ([9809c85](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/9809c8517514103ed8266ad68894701dc25c4252))
11
+
5
12
  ### [0.1.51](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.64...v0.1.51) (2025-01-05)
6
13
 
7
14
  ### [0.1.50](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.46...v0.1.50) (2024-12-31)
@@ -96,6 +96,8 @@ export const sliderProps = {
96
96
  minText: makeStringProp(''),
97
97
 
98
98
  maxText: makeStringProp(''),
99
+
100
+ unit: makeStringProp(''),
99
101
  }
100
102
 
101
103
  export type SliderExpose = {
@@ -6,6 +6,9 @@
6
6
  <view :class="`wd-slider__label-min ${customMinClass}`" v-if="!hideMinMax">
7
7
  {{ minText || minValue }}
8
8
  </view>
9
+ <view :class="`wd-slider__label-max ${customMaxClass}`" v-if="!hideMinMax">
10
+ {{ maxText || maxValue }}
11
+ </view>
9
12
  <view class="wd-slider__bar-wrapper" :style="barWrapperStyle">
10
13
  <view class="wd-slider__bar" :style="barCustomStyle"></view>
11
14
  <!-- 左边 -->
@@ -17,7 +20,7 @@
17
20
  @touchend="onTouchEnd"
18
21
  @touchcancel="onTouchEnd"
19
22
  >
20
- <view class="wd-slider__label" v-if="!hideLabel">{{ leftNewValue }}</view>
23
+ <view class="wd-slider__label" v-if="!hideLabel">{{ unit + leftNewValue }}</view>
21
24
  <view class="wd-slider__button" />
22
25
  </view>
23
26
  <!-- 右边 -->
@@ -30,13 +33,11 @@
30
33
  @touchend="onTouchEndRight"
31
34
  @touchcancel="onTouchEndRight"
32
35
  >
33
- <view class="wd-slider__label" v-if="!hideLabel">{{ rightNewValue }}</view>
36
+ <view class="wd-slider__label" v-if="!hideLabel">{{ unit + rightNewValue }}</view>
34
37
  <view class="wd-slider__button" />
35
38
  </view>
36
39
  </view>
37
- <view :class="`wd-slider__label-max ${customMaxClass}`" v-if="!hideMinMax">
38
- {{ maxText || maxValue }}
39
- </view>
40
+
40
41
  <!-- #ifdef MP-DINGTALK -->
41
42
  </view>
42
43
  <!-- #endif -->
@@ -214,7 +215,6 @@ function initSlider() {
214
215
  function onTouchStart(event: any) {
215
216
  const { disabled, modelValue } = props
216
217
  if (disabled) return
217
- event.preventDefault()
218
218
  touchLeft.touchStart(event)
219
219
  startValue.value = !isArray(modelValue)
220
220
  ? format(modelValue)
@@ -228,7 +228,6 @@ function onTouchStart(event: any) {
228
228
  function onTouchMove(event: any) {
229
229
  const { disabled } = props
230
230
  if (disabled) return
231
- event.preventDefault()
232
231
  touchLeft.touchMove(event)
233
232
  // 移动间距 deltaX 就是向左(-)向右(+)
234
233
  const diff = (touchLeft.deltaX.value / trackWidth.value) * (maxValue.value - minValue.value)
@@ -249,7 +248,6 @@ function onTouchEnd() {
249
248
  // 右边滑轮滑动状态监听
250
249
  function onTouchStartRight(event: any) {
251
250
  if (props.disabled) return
252
- event.preventDefault()
253
251
  const { modelValue } = props
254
252
  // 右滑轮移动时数据绑定
255
253
  touchRight.touchStart(event)
@@ -264,7 +262,6 @@ function onTouchStartRight(event: any) {
264
262
  }
265
263
  function onTouchMoveRight(event: any) {
266
264
  if (props.disabled) return
267
- event.preventDefault()
268
265
  touchRight.touchMove(event)
269
266
  // 移动间距 deltaX 就是向左向右
270
267
  const diff = (touchRight.deltaX.value / trackWidth.value) * (maxValue.value - minValue.value)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "@tplc/wot",
3
3
  "name": "@tplc/wot",
4
- "version": "0.1.51",
4
+ "version": "0.1.52",
5
5
  "keywords": [
6
6
  "wot-design-uni",
7
7
  "国际化",
@@ -107,6 +107,10 @@ export declare const sliderProps: {
107
107
  type: PropType<string>
108
108
  default: string
109
109
  }
110
+ unit: {
111
+ type: PropType<string>
112
+ default: string
113
+ }
110
114
  customStyle: {
111
115
  type: PropType<string>
112
116
  default: string
@@ -52,6 +52,10 @@ declare const _default: import('vue').DefineComponent<
52
52
  type: import('vue').PropType<string>
53
53
  default: string
54
54
  }
55
+ unit: {
56
+ type: import('vue').PropType<string>
57
+ default: string
58
+ }
55
59
  customStyle: {
56
60
  type: import('vue').PropType<string>
57
61
  default: string
@@ -131,6 +135,10 @@ declare const _default: import('vue').DefineComponent<
131
135
  type: import('vue').PropType<string>
132
136
  default: string
133
137
  }
138
+ unit: {
139
+ type: import('vue').PropType<string>
140
+ default: string
141
+ }
134
142
  customStyle: {
135
143
  type: import('vue').PropType<string>
136
144
  default: string
@@ -162,6 +170,7 @@ declare const _default: import('vue').DefineComponent<
162
170
  inactiveColor: string
163
171
  minText: string
164
172
  maxText: string
173
+ unit: string
165
174
  },
166
175
  {}
167
176
  >