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 CHANGED
@@ -1,3 +1,6 @@
1
+ ## 3.3.34(2024-09-23)
2
+ feat: 支持toast设置duration值为-1时不自动关闭
3
+
1
4
  ## 3.3.33(2024-09-18)
2
5
  fix: 修复test.date('008')等验证结果不准确
3
6
 
@@ -165,12 +165,15 @@
165
165
  // 清除定时器
166
166
  this.clearTimer()
167
167
  this.isShow = true
168
- this.timer = setTimeout(() => {
169
- // 倒计时结束,清除定时器,隐藏toast组件
170
- this.clearTimer()
171
- // 判断是否存在callback方法,如果存在就执行
172
- typeof(this.tmpConfig.complete) === 'function' && this.tmpConfig.complete()
173
- }, this.tmpConfig.duration)
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() {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "uview-plus",
3
3
  "name": "uview-plus",
4
4
  "displayName": "零云®uview-plus3.0重磅发布,全面的Vue3移动组件库。",
5
- "version": "3.3.33",
5
+ "version": "3.3.34",
6
6
  "description": "零云®uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
7
7
  "keywords": [
8
8
  "uview",