uview-plus 3.3.54 → 3.3.55
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
CHANGED
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
* @property {String | Number} fontSize 字体大小 (默认 14 )
|
|
80
80
|
* @property {Object} customStyle 定义需要用到的外部样式
|
|
81
81
|
* @event {Function} click 点击组件时触发
|
|
82
|
+
* @event {Function} close 点击关闭按钮时触发
|
|
82
83
|
* @example <u-alert :title="title" type = "warning" :closable="closable" :description = "description"></u-alert>
|
|
83
84
|
*/
|
|
84
85
|
export default {
|
|
@@ -116,7 +117,7 @@
|
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
},
|
|
119
|
-
emits: ["click"],
|
|
120
|
+
emits: ["click","close"],
|
|
120
121
|
methods: {
|
|
121
122
|
addUnit,
|
|
122
123
|
addStyle,
|
|
@@ -126,7 +127,8 @@
|
|
|
126
127
|
},
|
|
127
128
|
// 点击关闭按钮
|
|
128
129
|
closeHandler() {
|
|
129
|
-
this.show = false
|
|
130
|
+
this.show = false
|
|
131
|
+
this.$emit('close')
|
|
130
132
|
}
|
|
131
133
|
}
|
|
132
134
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<view
|
|
3
3
|
:style="[style]"
|
|
4
4
|
class="u-status-bar"
|
|
5
|
+
:class="[isH5 && 'u-safe-area-inset-top']"
|
|
5
6
|
>
|
|
6
7
|
<slot />
|
|
7
8
|
</view>
|
|
@@ -25,6 +26,9 @@
|
|
|
25
26
|
mixins: [mpMixin, mixin, props],
|
|
26
27
|
data() {
|
|
27
28
|
return {
|
|
29
|
+
// #ifdef H5
|
|
30
|
+
isH5: true
|
|
31
|
+
// #endif
|
|
28
32
|
}
|
|
29
33
|
},
|
|
30
34
|
computed: {
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
this.currentIndex = val; // 和上游数据关联上
|
|
144
144
|
}
|
|
145
145
|
},
|
|
146
|
-
emits: ["click", "change"],
|
|
146
|
+
emits: ["click", "change", "update:current"],
|
|
147
147
|
computed: {
|
|
148
148
|
itemStyle() {
|
|
149
149
|
return index => {
|
|
@@ -189,6 +189,7 @@
|
|
|
189
189
|
} = e.detail
|
|
190
190
|
this.pauseVideo(this.currentIndex)
|
|
191
191
|
this.currentIndex = current
|
|
192
|
+
this.$emit('update:current', this.currentIndex)
|
|
192
193
|
this.$emit('change', e.detail)
|
|
193
194
|
},
|
|
194
195
|
// 切换轮播时,暂停视频播放
|