@tarojs/taro 3.3.12 → 3.3.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/taro",
3
- "version": "3.3.12",
3
+ "version": "3.3.13",
4
4
  "description": "Taro framework",
5
5
  "homepage": "https://github.com/nervjs/taro/tree/master/packages/taro#readme",
6
6
  "main": "index.js",
@@ -26,9 +26,9 @@
26
26
  "author": "O2Team",
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
- "@tarojs/api": "3.3.12",
30
- "@tarojs/runtime": "3.3.12",
31
- "@tarojs/taro-h5": "3.3.12"
29
+ "@tarojs/api": "3.3.13",
30
+ "@tarojs/runtime": "3.3.13",
31
+ "@tarojs/taro-h5": "3.3.13"
32
32
  },
33
- "gitHead": "0d7650ee4263efafacd87b9c8b69bb29b2a852c0"
33
+ "gitHead": "d84177a97cc27c01ca63c9dd07e5ab5bbaa91d8a"
34
34
  }
@@ -219,4 +219,46 @@ declare namespace Taro {
219
219
  * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.hideLoading.html
220
220
  */
221
221
  function hideLoading(option?: hideLoading.Option): void
222
+
223
+ namespace enableAlertBeforeUnload {
224
+ interface Option {
225
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
226
+ complete?: (res: General.CallbackResult) => void
227
+ /** 接口调用失败的回调函数 */
228
+ fail?: (res: General.CallbackResult) => void
229
+ /** 接口调用成功的回调函数 */
230
+ success?: (res: General.CallbackResult) => void
231
+ }
232
+ }
233
+
234
+ /** 开启小程序页面返回询问对话框
235
+ * @supported weapp
236
+ * @example
237
+ * ```tsx
238
+ * Taro.enableAlertBeforeUnload({
239
+ * success: function () {
240
+ * console.log('success')
241
+ * },
242
+ * })
243
+ * ```
244
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.enableAlertBeforeUnload.html
245
+ */
246
+ function enableAlertBeforeUnload(option?: enableAlertBeforeUnload.Option): void
247
+
248
+ namespace disableAlertBeforeUnload {
249
+ interface Option {
250
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
251
+ complete?: (res: General.CallbackResult) => void
252
+ /** 接口调用失败的回调函数 */
253
+ fail?: (res: General.CallbackResult) => void
254
+ /** 接口调用成功的回调函数 */
255
+ success?: (res: General.CallbackResult) => void
256
+ }
257
+ }
258
+
259
+ /** 关闭小程序页面返回询问对话框
260
+ * @supported weapp
261
+ * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/interaction/wx.disableAlertBeforeUnload.html
262
+ */
263
+ function disableAlertBeforeUnload(option?: disableAlertBeforeUnload.Option): void
222
264
  }