uview-plus 3.3.64 → 3.3.66
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 +5 -0
- package/components/u-cate-tab/u-cate-tab.vue +4 -2
- package/components/u-image/u-image.vue +0 -1
- package/components/u-number-box/numberBox.js +5 -1
- package/components/u-number-box/props.js +21 -1
- package/components/u-number-box/u-number-box.vue +41 -34
- package/components/u-status-bar/u-status-bar.vue +7 -2
- package/components/u-steps-item/u-steps-item.vue +10 -6
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -12,9 +12,11 @@
|
|
|
12
12
|
<text v-if="!$slots['tabItem']" class="u-line-1">{{item[tabKeyName]}}</text>
|
|
13
13
|
</view>
|
|
14
14
|
</scroll-view>
|
|
15
|
-
<scroll-view :scroll-top="scrollRightTop" scroll-
|
|
15
|
+
<scroll-view :scroll-top="scrollRightTop" scroll-with-animation
|
|
16
|
+
scroll-y class="u-cate-tab__right-box" @scroll="rightScroll">
|
|
16
17
|
<view class="u-cate-tab__page-view">
|
|
17
|
-
<view class="u-cate-tab__page-item" :id="'item' + index"
|
|
18
|
+
<view class="u-cate-tab__page-item" :id="'item' + index"
|
|
19
|
+
v-for="(item , index) in tabList" :key="index">
|
|
18
20
|
<slot name="itemList" :item="item">
|
|
19
21
|
</slot>
|
|
20
22
|
<template v-if="!$slots['itemList']">
|
|
@@ -25,11 +25,15 @@ export default {
|
|
|
25
25
|
decimalLength: null,
|
|
26
26
|
longPress: true,
|
|
27
27
|
color: '#323233',
|
|
28
|
+
buttonWidth: 30,
|
|
28
29
|
buttonSize: 30,
|
|
30
|
+
buttonRadius: '0px',
|
|
29
31
|
bgColor: '#EBECEE',
|
|
32
|
+
inputBgColor: '#EBECEE',
|
|
30
33
|
cursorSpacing: 100,
|
|
31
34
|
disableMinus: false,
|
|
32
35
|
disablePlus: false,
|
|
33
|
-
iconStyle: ''
|
|
36
|
+
iconStyle: '',
|
|
37
|
+
miniMode: false
|
|
34
38
|
}
|
|
35
39
|
}
|
|
@@ -86,16 +86,31 @@ export const props = defineMixin({
|
|
|
86
86
|
type: String,
|
|
87
87
|
default: () => defProps.numberBox.color
|
|
88
88
|
},
|
|
89
|
+
// 按钮宽度
|
|
90
|
+
buttonWidth: {
|
|
91
|
+
type: [String, Number],
|
|
92
|
+
default: () => defProps.numberBox.buttonWidth
|
|
93
|
+
},
|
|
89
94
|
// 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致
|
|
90
95
|
buttonSize: {
|
|
91
96
|
type: [String, Number],
|
|
92
97
|
default: () => defProps.numberBox.buttonSize
|
|
93
98
|
},
|
|
99
|
+
// 按钮圆角
|
|
100
|
+
buttonRadius: {
|
|
101
|
+
type: [String],
|
|
102
|
+
default: () => defProps.numberBox.buttonRadius
|
|
103
|
+
},
|
|
94
104
|
// 输入框和按钮的背景颜色
|
|
95
105
|
bgColor: {
|
|
96
106
|
type: String,
|
|
97
107
|
default: () => defProps.numberBox.bgColor
|
|
98
108
|
},
|
|
109
|
+
// 输入框背景颜色
|
|
110
|
+
inputBgColor: {
|
|
111
|
+
type: String,
|
|
112
|
+
default: () => defProps.numberBox.inputBgColor
|
|
113
|
+
},
|
|
99
114
|
// 指定光标于键盘的距离,避免键盘遮挡输入框,单位px
|
|
100
115
|
cursorSpacing: {
|
|
101
116
|
type: [String, Number],
|
|
@@ -115,6 +130,11 @@ export const props = defineMixin({
|
|
|
115
130
|
iconStyle: {
|
|
116
131
|
type: [Object, String],
|
|
117
132
|
default: () => defProps.numberBox.iconStyle
|
|
118
|
-
}
|
|
133
|
+
},
|
|
134
|
+
// 迷你模式
|
|
135
|
+
miniMode: {
|
|
136
|
+
type: Boolean,
|
|
137
|
+
default: () => defProps.numberBox.miniMode
|
|
138
|
+
},
|
|
119
139
|
}
|
|
120
140
|
})
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
@tap.stop="clickHandler('minus')"
|
|
6
6
|
@touchstart="onTouchStart('minus')"
|
|
7
7
|
@touchend.stop="clearTimeout"
|
|
8
|
-
v-if="showMinus && $slots.minus"
|
|
8
|
+
v-if="showMinus && !hideMinus && $slots.minus"
|
|
9
9
|
>
|
|
10
10
|
<slot name="minus" />
|
|
11
11
|
</view>
|
|
12
12
|
<view
|
|
13
|
-
v-else-if="showMinus"
|
|
13
|
+
v-else-if="showMinus && !hideMinus"
|
|
14
14
|
class="u-number-box__minus cursor-pointer"
|
|
15
15
|
@tap.stop="clickHandler('minus')"
|
|
16
16
|
@touchstart="onTouchStart('minus')"
|
|
@@ -29,36 +29,38 @@
|
|
|
29
29
|
></u-icon>
|
|
30
30
|
</view>
|
|
31
31
|
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
32
|
+
<template v-if="!hideMinus">
|
|
33
|
+
<slot name="input">
|
|
34
|
+
<!-- #ifdef MP-WEIXIN -->
|
|
35
|
+
<input
|
|
36
|
+
:disabled="disabledInput || disabled"
|
|
37
|
+
:cursor-spacing="getCursorSpacing"
|
|
38
|
+
:class="{ 'u-number-box__input--disabled': disabled || disabledInput }"
|
|
39
|
+
:value="currentValue"
|
|
40
|
+
class="u-number-box__input"
|
|
41
|
+
@blur="onBlur"
|
|
42
|
+
@focus="onFocus"
|
|
43
|
+
@input="onInput"
|
|
44
|
+
type="number"
|
|
45
|
+
:style="[inputStyle]"
|
|
46
|
+
/>
|
|
47
|
+
<!-- #endif -->
|
|
48
|
+
<!-- #ifndef MP-WEIXIN -->
|
|
49
|
+
<input
|
|
50
|
+
:disabled="disabledInput || disabled"
|
|
51
|
+
:cursor-spacing="getCursorSpacing"
|
|
52
|
+
:class="{ 'u-number-box__input--disabled': disabled || disabledInput }"
|
|
53
|
+
v-model="currentValue"
|
|
54
|
+
class="u-number-box__input"
|
|
55
|
+
@blur="onBlur"
|
|
56
|
+
@focus="onFocus"
|
|
57
|
+
@input="onInput"
|
|
58
|
+
type="number"
|
|
59
|
+
:style="[inputStyle]"
|
|
60
|
+
/>
|
|
61
|
+
<!-- #endif -->
|
|
62
|
+
</slot>
|
|
63
|
+
</template>
|
|
62
64
|
<view
|
|
63
65
|
class="u-number-box__slot cursor-pointer"
|
|
64
66
|
@tap.stop="clickHandler('plus')"
|
|
@@ -164,6 +166,9 @@
|
|
|
164
166
|
// #endif
|
|
165
167
|
},
|
|
166
168
|
computed: {
|
|
169
|
+
hideMinus() {
|
|
170
|
+
return this.currentValue == 0 && this.miniMode == true
|
|
171
|
+
},
|
|
167
172
|
getCursorSpacing() {
|
|
168
173
|
// 判断传入的单位,如果为px单位,需要转成px
|
|
169
174
|
return getPx(this.cursorSpacing)
|
|
@@ -173,8 +178,10 @@
|
|
|
173
178
|
return (type) => {
|
|
174
179
|
const style = {
|
|
175
180
|
backgroundColor: this.bgColor,
|
|
181
|
+
width: addUnit(this.buttonWidth),
|
|
176
182
|
height: addUnit(this.buttonSize),
|
|
177
|
-
color: this.color
|
|
183
|
+
color: this.color,
|
|
184
|
+
borderRadius: this.buttonRadius
|
|
178
185
|
}
|
|
179
186
|
if (this.isDisabled(type)) {
|
|
180
187
|
style.backgroundColor = '#f7f8fa'
|
|
@@ -187,7 +194,7 @@
|
|
|
187
194
|
const disabled = this.disabled || this.disabledInput
|
|
188
195
|
const style = {
|
|
189
196
|
color: this.color,
|
|
190
|
-
backgroundColor: this.bgColor,
|
|
197
|
+
backgroundColor: this.inputBgColor || this.bgColor,
|
|
191
198
|
height: addUnit(this.buttonSize),
|
|
192
199
|
width: addUnit(this.inputWidth)
|
|
193
200
|
}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
mixins: [mpMixin, mixin, props],
|
|
27
27
|
data() {
|
|
28
28
|
return {
|
|
29
|
-
isH5:
|
|
29
|
+
isH5: false
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
created() {
|
|
@@ -38,7 +38,12 @@
|
|
|
38
38
|
style() {
|
|
39
39
|
const style = {}
|
|
40
40
|
// 状态栏高度,由于某些安卓和微信开发工具无法识别css的顶部状态栏变量,所以使用js获取的方式
|
|
41
|
-
|
|
41
|
+
let sheight = getWindowInfo().statusBarHeight
|
|
42
|
+
if (sheight == 0) {
|
|
43
|
+
this.isH5 = true
|
|
44
|
+
} else {
|
|
45
|
+
style.height = addUnit(sheight, 'px')
|
|
46
|
+
}
|
|
42
47
|
style.backgroundColor = this.bgColor
|
|
43
48
|
return deepMerge(style, addStyle(this.customStyle))
|
|
44
49
|
}
|
|
@@ -31,12 +31,16 @@
|
|
|
31
31
|
</slot>
|
|
32
32
|
</view>
|
|
33
33
|
<view class="u-steps-item__content" :class="[`u-steps-item__content--${parentData.direction}`]"
|
|
34
|
-
:style="[contentStyle]">
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
<
|
|
38
|
-
<up-text :text="
|
|
39
|
-
|
|
34
|
+
:style="[contentStyle]">
|
|
35
|
+
<slot name="content">
|
|
36
|
+
</slot>
|
|
37
|
+
<template v-if="!$slots['content']">
|
|
38
|
+
<up-text :text="title" :type="parentData.current == index ? 'main' : 'content'" lineHeight="20px"
|
|
39
|
+
:size="parentData.current == index ? 14 : 13"></up-text>
|
|
40
|
+
<slot name="desc">
|
|
41
|
+
<up-text :text="desc" type="tips" size="12"></up-text>
|
|
42
|
+
</slot>
|
|
43
|
+
</template>
|
|
40
44
|
</view>
|
|
41
45
|
<!-- <view
|
|
42
46
|
class="u-steps-item__line"
|
package/package.json
CHANGED