uview-plus 3.1.38 → 3.1.40
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 +7 -0
- package/components/u-datetime-picker/props.js +5 -0
- package/components/u-datetime-picker/u-datetime-picker.vue +17 -2
- package/components/u-grid-item/u-grid-item.vue +7 -2
- package/components/u-index-list/u-index-list.vue +2 -1
- package/components/u-picker/props.js +5 -0
- package/components/u-picker/u-picker.vue +2 -1
- package/components/u-safe-bottom/u-safe-bottom.vue +1 -1
- package/components/u-slider/u-slider.vue +2 -2
- package/libs/config/props/datetimePicker.js +1 -0
- package/libs/config/props/picker.js +1 -0
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<u-picker
|
|
3
3
|
ref="picker"
|
|
4
4
|
:show="show"
|
|
5
|
+
:popupMode="popupMode"
|
|
5
6
|
:closeOnClickOverlay="closeOnClickOverlay"
|
|
6
7
|
:columns="columns"
|
|
7
8
|
:title="title"
|
|
@@ -84,6 +85,16 @@
|
|
|
84
85
|
this.updateColumnValue(this.innerValue)
|
|
85
86
|
}
|
|
86
87
|
},
|
|
88
|
+
// #ifdef VUE3
|
|
89
|
+
modelValue(newValue) {
|
|
90
|
+
this.init()
|
|
91
|
+
},
|
|
92
|
+
// #endif
|
|
93
|
+
// #ifdef VUE2
|
|
94
|
+
value(newValue) {
|
|
95
|
+
this.init()
|
|
96
|
+
},
|
|
97
|
+
// #endif
|
|
87
98
|
propsChange() {
|
|
88
99
|
this.init()
|
|
89
100
|
}
|
|
@@ -198,8 +209,12 @@
|
|
|
198
209
|
// 更新各列的值,进行补0、格式化等操作
|
|
199
210
|
updateColumnValue(value) {
|
|
200
211
|
this.innerValue = value
|
|
201
|
-
|
|
202
|
-
|
|
212
|
+
this.updateColumns()
|
|
213
|
+
// 延迟执行,等待u-picker组件列数据更新完后再设置选中值索引
|
|
214
|
+
setTimeout(() => {
|
|
215
|
+
this.updateIndexs(value)
|
|
216
|
+
}, 0);
|
|
217
|
+
|
|
203
218
|
},
|
|
204
219
|
// 更新索引
|
|
205
220
|
updateIndexs(value) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- #ifndef APP-NVUE -->
|
|
3
3
|
<view
|
|
4
|
+
v-if="parentData.col > 0"
|
|
4
5
|
class="u-grid-item"
|
|
5
6
|
hover-class="u-grid-item--hover-class"
|
|
6
7
|
:hover-stay-time="200"
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
data() {
|
|
45
46
|
return {
|
|
46
47
|
parentData: {
|
|
47
|
-
col:
|
|
48
|
+
col: 0, // 父组件划分的宫格数
|
|
48
49
|
border: true, // 是否显示边框,根据父组件决定
|
|
49
50
|
},
|
|
50
51
|
// #ifdef APP-NVUE
|
|
@@ -65,7 +66,11 @@
|
|
|
65
66
|
// #ifndef APP-NVUE
|
|
66
67
|
// vue下放到computed中,否则会因为延时造成闪烁
|
|
67
68
|
width() {
|
|
68
|
-
|
|
69
|
+
if (this.parentData.col > 0) {
|
|
70
|
+
return 100 / Number(this.parentData.col) + '%'
|
|
71
|
+
} else {
|
|
72
|
+
return 0;
|
|
73
|
+
}
|
|
69
74
|
},
|
|
70
75
|
// #endif
|
|
71
76
|
itemStyle() {
|
|
@@ -191,7 +191,8 @@
|
|
|
191
191
|
// 设置列表的高度为整个屏幕的高度
|
|
192
192
|
//减去this.customNavHeight,并将this.scrollViewHeight设置为maxHeight
|
|
193
193
|
//解决当u-index-list组件放在tabbar页面时,scroll-view内容较少时,还能滚动
|
|
194
|
-
|
|
194
|
+
let customNavHeight = uni.$u.getPx(this.customNavHeight)
|
|
195
|
+
this.scrollViewHeight = this.sys.windowHeight - customNavHeight
|
|
195
196
|
},
|
|
196
197
|
// 索引列表被触摸
|
|
197
198
|
touchStart(e) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<u-popup
|
|
3
3
|
:show="show"
|
|
4
|
+
:mode="popupMode"
|
|
4
5
|
@close="closeHandler"
|
|
5
6
|
>
|
|
6
7
|
<view class="u-picker">
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
class="u-picker__view"
|
|
19
20
|
:indicatorStyle="`height: ${$u.addUnit(itemHeight)}`"
|
|
20
21
|
:value="innerIndex"
|
|
21
|
-
:immediateChange="
|
|
22
|
+
:immediateChange="true"
|
|
22
23
|
:style="{
|
|
23
24
|
height: `${$u.addUnit(visibleItemCount * itemHeight)}`
|
|
24
25
|
}"
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:min="min"
|
|
8
8
|
:max="max"
|
|
9
9
|
:step="step"
|
|
10
|
-
:value="
|
|
10
|
+
:value="modelValue"
|
|
11
11
|
:activeColor="activeColor"
|
|
12
12
|
:backgroundColor="inactiveColor"
|
|
13
13
|
:blockSize="$u.getPx(blockSize)"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
export default {
|
|
28
28
|
name: 'u--slider',
|
|
29
29
|
mixins: [mpMixin, mixin, props],
|
|
30
|
-
emits: ["changing", "change"],
|
|
30
|
+
emits: ["changing", "change", "update:modelValue"],
|
|
31
31
|
methods: {
|
|
32
32
|
// 拖动过程中触发
|
|
33
33
|
changingHandler(e) {
|