uview-plus 3.3.33 → 3.3.34
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 +3 -0
- package/components/u-toast/u-toast.vue +9 -6
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -165,12 +165,15 @@
|
|
|
165
165
|
// 清除定时器
|
|
166
166
|
this.clearTimer()
|
|
167
167
|
this.isShow = true
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
this.
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
168
|
+
// -1时不自动关闭
|
|
169
|
+
if (this.duration !== -1) {
|
|
170
|
+
this.timer = setTimeout(() => {
|
|
171
|
+
// 倒计时结束,清除定时器,隐藏toast组件
|
|
172
|
+
this.clearTimer()
|
|
173
|
+
// 判断是否存在callback方法,如果存在就执行
|
|
174
|
+
typeof(this.tmpConfig.complete) === 'function' && this.tmpConfig.complete()
|
|
175
|
+
}, this.tmpConfig.duration)
|
|
176
|
+
}
|
|
174
177
|
},
|
|
175
178
|
// 隐藏toast组件,由父组件通过this.$refs.xxx.hide()形式调用
|
|
176
179
|
hide() {
|