Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taro中缺少微信小程序 api enableAlertBeforeUnload(开启页面返回询问对话框)disableAlertBeforeUnload(关闭页面返回询问对话框) #8811

Closed
catsayer-heat opened this issue Mar 4, 2021 · 2 comments
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@catsayer-heat
Copy link

相关平台

微信小程序

小程序基础库: 2.15.0
使用框架: React

复现步骤

编写代码直接引入Taro.enableAlertBeforeUnload 和 Taro.disableAlertBeforeUnload 代码执行错误都是xxxx不是一个function
ts类型解析中也没有这两个(我看了3.0.24都后续的几个版本log,好像都没有修复)
微信相关文档链接

期望结果

代码编写能够直接使用Taro.enableAlertBeforeUnload 这种方式引入操作

实际结果

如果使用Taro操作 执行报错 需要wx.enableAlertBeforeUnload 引入

环境信息

Taro CLI 3.0.24 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 12.14.1 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.21.1 - C:\Users\catsayer\AppData\Roaming\npm\yarn.CMD
      npm: 6.14.8 - C:\Users\catsayer\AppData\Roaming\npm\npm.CMD
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Mar 4, 2021
@Chen-jj
Copy link
Contributor

Chen-jj commented Mar 5, 2021

3.1+ 已支持

@guopz
Copy link

guopz commented Aug 7, 2021

2.x 版本如果使用,需要怎么处理

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

3 participants