uview-plus 3.1.42 → 3.1.45
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-cell/u-cell.vue +5 -9
- package/components/u-collapse-item/u-collapse-item.vue +6 -11
- package/components/u-input/u-input.vue +4 -4
- package/components/u-swipe-action-item/other.js +2 -2
- package/components/u-swipe-action-item/u-swipe-action-item.vue +5 -12
- package/components/u-text/u-text.vue +2 -2
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## 3.1.45(2024-01-24)
|
|
2
|
+
fix: #262ext组件为超链接的情况下size属性不生效
|
|
3
|
+
fix: #263最新版本3.1.42中微信小程序u-swipe-action-item报错
|
|
4
|
+
fix: #224最新版本3.1.42中微信小程序u-swipe-action-item报错
|
|
5
|
+
fix: #263支持支付宝小程序
|
|
6
|
+
fix: #261u-input在直接修改v-model的绑定值时,每隔一次会无法出发change事件
|
|
7
|
+
优化折叠面板兼容微信小程序
|
|
1
8
|
## 3.1.42(2024-01-15)
|
|
2
9
|
修复u-number-box默认值0时在小程序不显示值
|
|
3
10
|
优化u-code的timer判断
|
|
@@ -11,11 +11,9 @@
|
|
|
11
11
|
:custom-style="iconStyle"
|
|
12
12
|
:size="size === 'large' ? 22 : 18"></u-icon>
|
|
13
13
|
</view>
|
|
14
|
-
<view class="u-cell__title">
|
|
15
|
-
|
|
16
|
-
<text v-if="title" class="u-cell__title-text" :style="[titleTextStyle]"
|
|
14
|
+
<view class="u-cell__title">
|
|
15
|
+
<text v-else class="u-cell__title-text" :style="[titleTextStyle]"
|
|
17
16
|
:class="[disabled && 'u-cell--disabled', size === 'large' && 'u-cell__title-text--large']">{{ title }}</text>
|
|
18
|
-
</slot>
|
|
19
17
|
<slot name="label">
|
|
20
18
|
<text class="u-cell__label" v-if="label"
|
|
21
19
|
:class="[disabled && 'u-cell--disabled', size === 'large' && 'u-cell__label--large']">{{ label }}</text>
|
|
@@ -29,10 +27,8 @@
|
|
|
29
27
|
</slot>
|
|
30
28
|
<view class="u-cell__right-icon-wrap" v-if="$slots['right-icon'] || isLink"
|
|
31
29
|
:class="[`u-cell__right-icon-wrap--${arrowDirection}`]">
|
|
32
|
-
<slot name="right-icon"
|
|
33
|
-
|
|
34
|
-
<u-icon v-else :name="rightIcon" :custom-style="rightIconStyle" :color="disabled ? '#c8c9cc' : 'info'"
|
|
35
|
-
:size="size === 'large' ? 18 : 16"></u-icon>
|
|
30
|
+
<slot name="right-icon">
|
|
31
|
+
<u-icon v-if="rightIcon" :name="rightIcon" :custom-style="rightIconStyle" :color="disabled ? '#c8c9cc' : 'info'"
|
|
36
32
|
</view>
|
|
37
33
|
</view>
|
|
38
34
|
<u-line v-if="border"></u-line>
|
|
@@ -145,7 +141,7 @@
|
|
|
145
141
|
&__content {
|
|
146
142
|
@include flex(row);
|
|
147
143
|
align-items: center;
|
|
148
|
-
flex: 1
|
|
144
|
+
flex: 1;
|
|
149
145
|
}
|
|
150
146
|
|
|
151
147
|
&--large {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="u-collapse-item">
|
|
3
3
|
<u-cell
|
|
4
|
-
:title="title"
|
|
4
|
+
:title="$slots.title ? '' : title"
|
|
5
5
|
:value="value"
|
|
6
6
|
:label="label"
|
|
7
7
|
:icon="icon"
|
|
@@ -12,21 +12,16 @@
|
|
|
12
12
|
:arrowDirection="expanded ? 'up' : 'down'"
|
|
13
13
|
:disabled="disabled"
|
|
14
14
|
>
|
|
15
|
-
<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
|
|
16
15
|
<!-- 微信小程序不支持,因为微信中不支持 <slot name="title" slot="title" />的写法 -->
|
|
17
|
-
<template #title>
|
|
18
|
-
<slot name="
|
|
19
|
-
</template>
|
|
20
|
-
<template #icon>
|
|
21
|
-
<slot name="icon"></slot>
|
|
16
|
+
<template #title>
|
|
17
|
+
<slot name="icon">
|
|
22
18
|
</template>
|
|
23
19
|
<template #value>
|
|
24
|
-
<slot name="value"
|
|
20
|
+
<slot name="value">
|
|
25
21
|
</template>
|
|
26
22
|
<template #right-icon>
|
|
27
|
-
<slot name="right-icon"
|
|
23
|
+
<slot name="right-icon">
|
|
28
24
|
</template>
|
|
29
|
-
<!-- #endif -->
|
|
30
25
|
</u-cell>
|
|
31
26
|
<view
|
|
32
27
|
class="u-collapse-item__content"
|
|
@@ -101,7 +96,7 @@
|
|
|
101
96
|
}
|
|
102
97
|
},
|
|
103
98
|
mounted() {
|
|
104
|
-
this.init()
|
|
99
|
+
this.init()
|
|
105
100
|
},
|
|
106
101
|
methods: {
|
|
107
102
|
// 异步获取内容,或者动态修改了内容时,需要重新初始化
|
|
@@ -148,10 +148,10 @@ export default {
|
|
|
148
148
|
// 在H5中,外部value变化后,修改input中的值,不会触发@input事件,此时手动调用值变化方法
|
|
149
149
|
if (
|
|
150
150
|
this.firstChange === false &&
|
|
151
|
-
|
|
151
|
+
this.changeFromInner === false
|
|
152
152
|
) {
|
|
153
153
|
this.valueChange();
|
|
154
|
-
}
|
|
154
|
+
} else {
|
|
155
155
|
/* #endif */
|
|
156
156
|
this.firstChange = false;
|
|
157
157
|
// 重置changeFromInner的值为false,标识下一次引起默认为外部引起的
|
|
@@ -171,7 +171,7 @@ export default {
|
|
|
171
171
|
this.changeFromInner === false
|
|
172
172
|
) {
|
|
173
173
|
this.valueChange();
|
|
174
|
-
}
|
|
174
|
+
} else {
|
|
175
175
|
/* #endif */
|
|
176
176
|
this.firstChange = false;
|
|
177
177
|
// 重置changeFromInner的值为false,标识下一次引起默认为外部引起的
|
|
@@ -255,7 +255,7 @@ export default {
|
|
|
255
255
|
this.$emit("blur", event.detail.value);
|
|
256
256
|
// H5端的blur会先于点击清除控件的点击click事件触发,导致focused
|
|
257
257
|
// 瞬间为false,从而隐藏了清除控件而无法被点击到
|
|
258
|
-
uni.$u.sleep(
|
|
258
|
+
uni.$u.sleep(150).then(() => {
|
|
259
259
|
this.focused = false;
|
|
260
260
|
});
|
|
261
261
|
// 尝试调用u-form的验证方法
|
|
@@ -28,9 +28,9 @@ export default {
|
|
|
28
28
|
},
|
|
29
29
|
methods: {
|
|
30
30
|
clickHandler() {
|
|
31
|
-
},
|
|
31
|
+
},
|
|
32
32
|
getBtnWidth() {
|
|
33
|
-
let view = uni.createSelectorQuery().in(this).select(".u-swipe-action-
|
|
33
|
+
let view = uni.createSelectorQuery().in(this).select(".u-swipe-action-item__right");
|
|
34
34
|
view.fields({
|
|
35
35
|
size: true,
|
|
36
36
|
scrollOffset: true
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
</view>
|
|
31
31
|
</slot>
|
|
32
32
|
</view>
|
|
33
|
-
<!-- #ifdef APP-VUE || MP-WEIXIN || MP-QQ -->
|
|
33
|
+
<!-- #ifdef APP-VUE || MP-WEIXIN || MP-QQ || H5 -->
|
|
34
34
|
<view class="u-swipe-action-item__content" @touchstart="wxs.touchstart" @touchmove="wxs.touchmove"
|
|
35
35
|
@touchend="wxs.touchend" :status="status" :change:status="wxs.statusChange" :size="size"
|
|
36
36
|
:change:size="wxs.sizeChange">
|
|
37
37
|
<slot></slot>
|
|
38
38
|
</view>
|
|
39
39
|
<!-- #endif -->
|
|
40
|
-
<!-- #ifdef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO
|
|
40
|
+
<!-- #ifdef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO-->
|
|
41
41
|
<view class="u-swipe-action-item__content" @click="clickHandler" @touchstart="touchstart" @touchmove="touchmove"
|
|
42
42
|
@touchend="touchend" :style="sliderStyle">
|
|
43
43
|
<slot></slot>
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
// #ifdef APP-VUE || MP-WEIXIN || MP-QQ || H5
|
|
70
70
|
import wxs from './wxs.js';
|
|
71
71
|
// #endif
|
|
72
|
-
// #ifdef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO
|
|
72
|
+
// #ifdef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO
|
|
73
73
|
import other from './other.js';
|
|
74
74
|
// #endif
|
|
75
75
|
/**
|
|
@@ -90,15 +90,8 @@
|
|
|
90
90
|
export default {
|
|
91
91
|
name: 'u-swipe-action-item',
|
|
92
92
|
emits: ['click'],
|
|
93
|
-
|
|
94
|
-
mixins: [
|
|
95
|
-
// #endif
|
|
96
|
-
// #ifdef APP-NVUE
|
|
97
|
-
mixins: [mpMixin, mixin, props, nvue, touch],
|
|
98
|
-
// #endif
|
|
99
|
-
// #ifdef APP-VUE || MP-WEIXIN || H5 || MP-QQ
|
|
100
|
-
mixins: [mpMixin, mixin, props, touch, wxs, other],
|
|
101
|
-
// #endif
|
|
93
|
+
|
|
94
|
+
mixins: [
|
|
102
95
|
data() {
|
|
103
96
|
return {
|
|
104
97
|
// 按钮的尺寸信息
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
></u-icon>
|
|
23
23
|
</view>
|
|
24
24
|
<u-link
|
|
25
|
-
v-if="mode === 'link'"
|
|
26
|
-
:
|
|
25
|
+
v-if="mode === 'link'"
|
|
26
|
+
:style="{fontWeight: valueStyle.fontWeight, wordWrap: valueStyle.wordWrap, fontSize: valueStyle.fontSize}"
|
|
27
27
|
:href="href"
|
|
28
28
|
underLine
|
|
29
29
|
></u-link>
|