uview-plus 3.3.21 → 3.3.23
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 +8 -0
- package/components/u-swipe-action/props.js +5 -0
- package/components/u-swipe-action/u-swipe-action.vue +15 -0
- package/components/u-swipe-action-item/u-swipe-action-item.vue +6 -1
- package/components/u-tabs/u-tabs.vue +3 -2
- package/libs/mixin/mixin.js +3 -0
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
return [this.autoClose]
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
+
emits: ['opendItem:update'],
|
|
38
39
|
watch: {
|
|
39
40
|
// 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
|
|
40
41
|
parentData() {
|
|
@@ -45,6 +46,11 @@
|
|
|
45
46
|
})
|
|
46
47
|
}
|
|
47
48
|
},
|
|
49
|
+
opendItem(val) {
|
|
50
|
+
if (val == false) {
|
|
51
|
+
this.closeAll()
|
|
52
|
+
}
|
|
53
|
+
}
|
|
48
54
|
},
|
|
49
55
|
created() {
|
|
50
56
|
this.children = []
|
|
@@ -59,6 +65,15 @@
|
|
|
59
65
|
}
|
|
60
66
|
})
|
|
61
67
|
}
|
|
68
|
+
},
|
|
69
|
+
closeAll() {
|
|
70
|
+
// 关闭所有单元格
|
|
71
|
+
this.children.map((item, index) => {
|
|
72
|
+
item.closeHandler()
|
|
73
|
+
})
|
|
74
|
+
},
|
|
75
|
+
setOpendItem(ins) {
|
|
76
|
+
this.$emit('opendItem:update', true)
|
|
62
77
|
}
|
|
63
78
|
}
|
|
64
79
|
}
|
|
@@ -127,8 +127,13 @@
|
|
|
127
127
|
// #ifndef APP-NVUE
|
|
128
128
|
wxsInit(newValue, oldValue) {
|
|
129
129
|
this.queryRect()
|
|
130
|
-
}
|
|
130
|
+
},
|
|
131
131
|
// #endif
|
|
132
|
+
status(newValue) {
|
|
133
|
+
if (newValue === 'open') {
|
|
134
|
+
this.parent && this.parent.setOpendItem(this)
|
|
135
|
+
}
|
|
136
|
+
}
|
|
132
137
|
},
|
|
133
138
|
computed: {
|
|
134
139
|
wxsInit() {
|
|
@@ -234,6 +234,9 @@
|
|
|
234
234
|
},
|
|
235
235
|
setScrollLeft() {
|
|
236
236
|
// 当前活动tab的布局信息,有tab菜单的width和left(为元素左边界到父元素左边界的距离)等信息
|
|
237
|
+
if (this.innerCurrent < 0) {
|
|
238
|
+
this.innerCurrent = 0;
|
|
239
|
+
}
|
|
237
240
|
const tabRect = this.list[this.innerCurrent]
|
|
238
241
|
// 累加得到当前item到左边的距离
|
|
239
242
|
const offsetLeft = this.list
|
|
@@ -359,9 +362,7 @@
|
|
|
359
362
|
&__text {
|
|
360
363
|
font-size: 15px;
|
|
361
364
|
color: $u-content-color;
|
|
362
|
-
/* #ifndef APP-NVUE */
|
|
363
365
|
white-space: nowrap !important;
|
|
364
|
-
/* #endif */
|
|
365
366
|
|
|
366
367
|
&--disabled {
|
|
367
368
|
color: $u-disabled-color !important;
|
package/libs/mixin/mixin.js
CHANGED
|
@@ -106,6 +106,9 @@ export const mixin = defineMixin({
|
|
|
106
106
|
// })
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
|
+
navTo(url = '', linkType = 'navigateTo') {
|
|
110
|
+
route({ type: this.linkType, url })
|
|
111
|
+
},
|
|
109
112
|
// 查询节点信息
|
|
110
113
|
// 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
|
|
111
114
|
// 解决办法为在组件根部再套一个没有任何作用的view元素
|