uview-plus 3.3.5 → 3.3.7
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 +55 -0
- package/components/u-action-sheet/props.js +6 -1
- package/components/u-action-sheet/u-action-sheet.vue +4 -5
- package/components/u-album/props.js +10 -0
- package/components/u-album/u-album.vue +9 -3
- package/components/u-calendar/header.vue +2 -0
- package/components/u-calendar/month.vue +1 -0
- package/components/u-cell/u-cell.vue +20 -1
- package/components/u-checkbox/u-checkbox.vue +28 -18
- package/components/u-code/u-code.vue +0 -5
- package/components/u-count-down/u-count-down.vue +0 -5
- package/components/u-form-item/u-form-item.vue +1 -1
- package/components/u-grid-item/u-grid-item.vue +0 -5
- package/components/u-index-list/props.js +6 -1
- package/components/u-index-list/u-index-list.vue +169 -42
- package/components/u-modal/u-modal.vue +3 -3
- package/components/u-notify/u-notify.vue +0 -5
- package/components/u-number-box/u-number-box.vue +1 -0
- package/components/u-parse/node/node.vue +1 -1
- package/components/u-parse/u-parse.vue +1 -7
- package/components/u-picker/u-picker.vue +2 -1
- package/components/u-popup/u-popup.vue +3 -1
- package/components/u-row-notice/u-row-notice.vue +1 -8
- package/components/u-scroll-list/nvue.js +1 -1
- package/components/u-scroll-list/u-scroll-list.vue +5 -2
- package/components/u-slider/props.js +45 -19
- package/components/u-slider/u-slider.vue +376 -7
- package/components/u-sticky/u-sticky.vue +0 -5
- package/components/u-swipe-action-item/nvue.js +0 -5
- package/components/u-tabs/u-tabs.vue +11 -3
- package/components/u-toast/u-toast.vue +10 -10
- package/components/u-upload/u-upload.vue +9 -4
- package/components/u-upload/utils.js +10 -4
- package/components/u-waterfall/u-waterfall.vue +1 -1
- package/libs/config/props/actionSheet.js +2 -1
- package/libs/config/props/indexList.js +2 -1
- package/libs/config/props/slider.js +3 -1
- package/libs/css/common.scss +1 -1
- package/libs/mixin/mixin.js +1 -7
- package/package.json +1 -1
- package/types/comps/album.d.ts +10 -0
- package/types/index.d.ts +155 -29
- package/components/u-slider/nvue - /345/211/257/346/234/254.js" +0 -180
package/changelog.md
CHANGED
|
@@ -1,3 +1,58 @@
|
|
|
1
|
+
## 3.3.7(2024-07-29)
|
|
2
|
+
feat: 支持IndexList组件支持在弹窗等场景下使用及联动优化
|
|
3
|
+
|
|
4
|
+
feat: popup组件支持v-model:show双向绑定
|
|
5
|
+
|
|
6
|
+
feat: 优化tabs的current双向绑定
|
|
7
|
+
|
|
8
|
+
fix: checkbox独立使用时checked赋初始值可以,但是手动切换时值没有做双向绑定! #455
|
|
9
|
+
|
|
10
|
+
feat: slider组件支持区间双滑块
|
|
11
|
+
|
|
12
|
+
fix: toast 支持自定义图标?可传入了决对路径的 icon也没有用 #409
|
|
13
|
+
|
|
14
|
+
feat: form-item校验失败时 增加class方便自定义显示错误的展示方式 #394
|
|
15
|
+
|
|
16
|
+
fix: up-cell的required配置不生效 #395
|
|
17
|
+
|
|
18
|
+
fix: 横向滚动组件,微信小程序编译后会有警告 #415
|
|
19
|
+
|
|
20
|
+
fix: u-picker内部对默认值defaultIndex的监听 #425
|
|
21
|
+
|
|
22
|
+
feat: toast 组件支持遮掩层穿透 #417
|
|
23
|
+
|
|
24
|
+
fix: 兼容vue的slot编译bug #423
|
|
25
|
+
|
|
26
|
+
fix: upload 微信小程序 点击预览视频报错 #424
|
|
27
|
+
|
|
28
|
+
fix: u-number-box 组件修改【integer, decimalLength, min, max 】props时没有触发绑定值更新 #429
|
|
29
|
+
|
|
30
|
+
feat: Tabs组件能否支持自定义插槽 #439
|
|
31
|
+
|
|
32
|
+
feat: ActionSheet 可以配置最大高度吗, 我当做select使用了。 #445
|
|
33
|
+
|
|
34
|
+
fix: cursor-pointer优化
|
|
35
|
+
|
|
36
|
+
feat: 新版slider组件兼容NVUE改造
|
|
37
|
+
|
|
38
|
+
feat: 新增slider组件手动实现以支持样式自定义
|
|
39
|
+
|
|
40
|
+
perf:补充TS声明提示信息
|
|
41
|
+
|
|
42
|
+
修复:ActionSheet 操作菜单cancelText属性为空DOM节点还存在并且可以点击问题
|
|
43
|
+
|
|
44
|
+
fix: 去除预留的beforeDestroy兼容容易在某些sdk下不识别条件编译
|
|
45
|
+
|
|
46
|
+
## 3.3.6(2024-07-23)
|
|
47
|
+
feat: u-album组件添加radius,shape参数,定义参考当前u-image参数
|
|
48
|
+
|
|
49
|
+
fix: 修复了calendar组件title和日期title未垂直居中的问题
|
|
50
|
+
|
|
51
|
+
fix: update:modelValue缺失emit定义
|
|
52
|
+
|
|
53
|
+
## 3.3.5(2024-07-10)
|
|
54
|
+
picker组件支持hasInput模式
|
|
55
|
+
|
|
1
56
|
## 3.3.4(2024-07-07)
|
|
2
57
|
fix: input组件双向绑定问题 #419
|
|
3
58
|
|
|
@@ -52,6 +52,11 @@ export const props = defineMixin({
|
|
|
52
52
|
round: {
|
|
53
53
|
type: [Boolean, String, Number],
|
|
54
54
|
default: () => defProps.actionSheet.round
|
|
55
|
-
}
|
|
55
|
+
},
|
|
56
|
+
// 选项区域最大高度
|
|
57
|
+
wrapMaxHeight: {
|
|
58
|
+
type: [String],
|
|
59
|
+
default: () => defProps.actionSheet.wrapMaxHeight
|
|
60
|
+
},
|
|
56
61
|
}
|
|
57
62
|
})
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
>{{description}}</text>
|
|
35
35
|
<slot>
|
|
36
36
|
<u-line v-if="description"></u-line>
|
|
37
|
-
<view class="u-action-sheet__item-wrap">
|
|
37
|
+
<scroll-view scroll-y class="u-action-sheet__item-wrap" :style="{maxHeight: wrapMaxHeight}">
|
|
38
38
|
<view :key="index" v-for="(item, index) in actions">
|
|
39
39
|
<!-- #ifdef MP -->
|
|
40
40
|
<button
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
<!-- #endif -->
|
|
86
86
|
<u-line v-if="index !== actions.length - 1"></u-line>
|
|
87
87
|
</view>
|
|
88
|
-
</view>
|
|
88
|
+
</scroll-view>
|
|
89
89
|
</slot>
|
|
90
90
|
<u-gap
|
|
91
91
|
bgColor="#eaeaec"
|
|
@@ -93,11 +93,10 @@
|
|
|
93
93
|
v-if="cancelText"
|
|
94
94
|
></u-gap>
|
|
95
95
|
<view class="u-action-sheet__item-wrap__item u-action-sheet__cancel"
|
|
96
|
-
hover-class="u-action-sheet--hover" @tap="cancel">
|
|
96
|
+
hover-class="u-action-sheet--hover" @tap="cancel" v-if="cancelText">
|
|
97
97
|
<text
|
|
98
98
|
@touchmove.stop.prevent
|
|
99
99
|
:hover-stay-time="150"
|
|
100
|
-
v-if="cancelText"
|
|
101
100
|
class="u-action-sheet__cancel-text"
|
|
102
101
|
>{{cancelText}}</text>
|
|
103
102
|
</view>
|
|
@@ -271,7 +270,7 @@
|
|
|
271
270
|
font-size: $u-action-sheet-cancel-text-font-size;
|
|
272
271
|
color: $u-action-sheet-cancel-text-color;
|
|
273
272
|
text-align: center;
|
|
274
|
-
padding: $u-action-sheet-cancel-text-font-size;
|
|
273
|
+
// padding: $u-action-sheet-cancel-text-font-size;
|
|
275
274
|
}
|
|
276
275
|
|
|
277
276
|
&--hover {
|
|
@@ -56,6 +56,16 @@ export const props = defineMixin({
|
|
|
56
56
|
showMore: {
|
|
57
57
|
type: Boolean,
|
|
58
58
|
default: () => defProps.album.showMore
|
|
59
|
+
},
|
|
60
|
+
// 图片形状,circle-圆形,square-方形
|
|
61
|
+
shape: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: () => defProps.image.shape
|
|
64
|
+
},
|
|
65
|
+
// 圆角,单位任意
|
|
66
|
+
radius: {
|
|
67
|
+
type: [String, Number],
|
|
68
|
+
default: () => defProps.image.radius
|
|
59
69
|
}
|
|
60
70
|
}
|
|
61
71
|
})
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
:style="[
|
|
27
27
|
{
|
|
28
28
|
width: imageWidth,
|
|
29
|
-
height: imageHeight
|
|
29
|
+
height: imageHeight,
|
|
30
|
+
borderRadius: shape == 'circle' ? '10000px' : addUnit(radius)
|
|
30
31
|
}
|
|
31
32
|
]"
|
|
32
33
|
></image>
|
|
@@ -38,6 +39,9 @@
|
|
|
38
39
|
index1 === showUrls[showUrls.length - 1].length - 1
|
|
39
40
|
"
|
|
40
41
|
class="u-album__row__wrapper__text"
|
|
42
|
+
:style="{
|
|
43
|
+
borderRadius: shape == 'circle' ? '50%' : addUnit(radius),
|
|
44
|
+
}"
|
|
41
45
|
>
|
|
42
46
|
<up-text
|
|
43
47
|
:text="`+${urls.length - maxCount}`"
|
|
@@ -79,7 +83,8 @@ const dom = uni.requireNativePlugin('dom')
|
|
|
79
83
|
* @property {Boolean} previewFullImage 是否可以预览图片 (默认 true )
|
|
80
84
|
* @property {String | Number} rowCount 每行展示图片数量,如设置,singleSize和multipleSize将会无效 (默认 3 )
|
|
81
85
|
* @property {Boolean} showMore 超出maxCount时是否显示查看更多的提示 (默认 true )
|
|
82
|
-
*
|
|
86
|
+
* @property {String} shape 图片形状,circle-圆形,square-方形 (默认 'square' )
|
|
87
|
+
* @property {String | Number} radius 圆角值,单位任意,如果为数值,则为px单位 (默认 0 )
|
|
83
88
|
* @event {Function} albumWidth 某些特殊的情况下,需要让文字与相册的宽度相等,这里事件的形式对外发送 (回调参数 width )
|
|
84
89
|
* @example <u-album :urls="urls2" @albumWidth="width => albumWidth = width" multipleSize="68" ></u-album>
|
|
85
90
|
*/
|
|
@@ -173,6 +178,7 @@ export default {
|
|
|
173
178
|
}
|
|
174
179
|
},
|
|
175
180
|
methods: {
|
|
181
|
+
addUnit,
|
|
176
182
|
// 预览图片
|
|
177
183
|
onPreviewTap(url) {
|
|
178
184
|
const urls = this.urls.map((item) => {
|
|
@@ -261,4 +267,4 @@ export default {
|
|
|
261
267
|
}
|
|
262
268
|
}
|
|
263
269
|
}
|
|
264
|
-
</style>
|
|
270
|
+
</style>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<slot name="title" v-if="$slots.title || !title">
|
|
17
17
|
</slot>
|
|
18
18
|
<text v-else class="u-cell__title-text" :style="[titleTextStyle]"
|
|
19
|
-
:class="[disabled && 'u-cell--disabled', size === 'large' && 'u-cell__title-text--large']">{{ title }}</text>
|
|
19
|
+
:class="[required && 'u-cell--required', disabled && 'u-cell--disabled', size === 'large' && 'u-cell__title-text--large']">{{ title }}</text>
|
|
20
20
|
<slot name="label">
|
|
21
21
|
<text class="u-cell__label" v-if="label"
|
|
22
22
|
:class="[disabled && 'u-cell--disabled', size === 'large' && 'u-cell__label--large']">{{ label }}</text>
|
|
@@ -231,6 +231,25 @@
|
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
+
&--required {
|
|
235
|
+
/* #ifndef APP-NVUE */
|
|
236
|
+
overflow: visible;
|
|
237
|
+
/* #endif */
|
|
238
|
+
@include flex;
|
|
239
|
+
align-items: center;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
&--required:before {
|
|
243
|
+
position: absolute;
|
|
244
|
+
/* #ifndef APP-NVUE */
|
|
245
|
+
content: '*';
|
|
246
|
+
/* #endif */
|
|
247
|
+
left: -8px;
|
|
248
|
+
margin-top: 4rpx;
|
|
249
|
+
font-size: 14px;
|
|
250
|
+
color: $u-error;
|
|
251
|
+
}
|
|
252
|
+
|
|
234
253
|
&--clickable {
|
|
235
254
|
background-color: $u-cell-clickable-color;
|
|
236
255
|
}
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
mounted() {
|
|
190
190
|
this.init()
|
|
191
191
|
},
|
|
192
|
-
emits: ["change"],
|
|
192
|
+
emits: ["change", "update:checked"],
|
|
193
193
|
methods: {
|
|
194
194
|
init() {
|
|
195
195
|
if (!this.usedAlone) {
|
|
@@ -198,21 +198,25 @@
|
|
|
198
198
|
if (!this.parent) {
|
|
199
199
|
error('u-checkbox必须搭配u-checkbox-group组件使用')
|
|
200
200
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
this.
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}
|
|
201
|
+
// #ifdef VUE2
|
|
202
|
+
const value = this.parentData.value
|
|
203
|
+
// #endif
|
|
204
|
+
// #ifdef VUE3
|
|
205
|
+
const value = this.parentData.modelValue
|
|
206
|
+
// #endif
|
|
207
|
+
// 设置初始化时,是否默认选中的状态,父组件u-checkbox-group的value可能是array,所以额外判断
|
|
208
|
+
if (this.checked) {
|
|
209
|
+
this.isChecked = true
|
|
210
|
+
} else if (!this.usedAlone && test.array(value)) {
|
|
211
|
+
// 查找数组是是否存在this.name元素值
|
|
212
|
+
this.isChecked = value.some(item => {
|
|
213
|
+
return item === this.name
|
|
214
|
+
})
|
|
215
|
+
}
|
|
216
|
+
} else {
|
|
217
|
+
if (this.checked) {
|
|
218
|
+
this.isChecked = true
|
|
219
|
+
}
|
|
216
220
|
}
|
|
217
221
|
},
|
|
218
222
|
updateParentData() {
|
|
@@ -244,6 +248,10 @@
|
|
|
244
248
|
},
|
|
245
249
|
emitEvent() {
|
|
246
250
|
this.$emit('change', this.isChecked)
|
|
251
|
+
// 双向绑定
|
|
252
|
+
if (this.usedAlone) {
|
|
253
|
+
this.$emit('update:checked', this.isChecked)
|
|
254
|
+
}
|
|
247
255
|
// 尝试调用u-form的验证方法,进行一定延迟,否则微信小程序更新可能会不及时
|
|
248
256
|
this.$nextTick(() => {
|
|
249
257
|
formValidate(this, 'change')
|
|
@@ -262,8 +270,10 @@
|
|
|
262
270
|
}
|
|
263
271
|
},
|
|
264
272
|
watch:{
|
|
265
|
-
checked(){
|
|
266
|
-
this.isChecked
|
|
273
|
+
checked(newValue, oldValue){
|
|
274
|
+
if (newValue !== this.isChecked) {
|
|
275
|
+
this.isChecked = newValue
|
|
276
|
+
}
|
|
267
277
|
}
|
|
268
278
|
}
|
|
269
279
|
}
|
|
@@ -119,12 +119,7 @@
|
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
// 组件销毁的时候,清除定时器,否则定时器会继续存在,系统不会自动清除
|
|
122
|
-
// #ifdef VUE2
|
|
123
|
-
beforeDestroy() {
|
|
124
|
-
// #endif
|
|
125
|
-
// #ifdef VUE3
|
|
126
122
|
beforeUnmount() {
|
|
127
|
-
// #endif
|
|
128
123
|
this.setTimeToStorage()
|
|
129
124
|
clearTimeout(this.timer)
|
|
130
125
|
this.timer = null
|
|
@@ -26,6 +26,11 @@ export const props = defineMixin({
|
|
|
26
26
|
customNavHeight: {
|
|
27
27
|
type: [String, Number],
|
|
28
28
|
default: () => defProps.indexList.customNavHeight
|
|
29
|
-
}
|
|
29
|
+
},
|
|
30
|
+
// 是否开启底部安全距离适配
|
|
31
|
+
safeBottomFix: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: () => defProps.indexList.safeBottomFix
|
|
34
|
+
},
|
|
30
35
|
}
|
|
31
36
|
})
|