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.openDocument 打开excel文件死循环问题 #1649

Closed
szy0syz opened this issue Dec 23, 2018 · 2 comments
Closed

关于 Taro.openDocument 打开excel文件死循环问题 #1649

szy0syz opened this issue Dec 23, 2018 · 2 comments

Comments

@szy0syz
Copy link

szy0syz commented Dec 23, 2018

问题描述
在微信小程序中使用Taro.openDocument时,不管使用临时文件地址或saveFile后的地址,会被循环打开无数次excel文件。

复现步骤
例如先用Taro.downloadFile拿到tempFilePath地址,再Taro.saveFile存储拿到savedFilePath,最后Taro.openDocument打开savedFilePath,就死循环了。但关键Taro.saveFile里的success回调仅执行一次,且不管async/await或者promise调用都是一样情况。

期望行为
Taro.openDocument打开一次文件

系统信息

Taro CLI 1.2.1 environment info:
    System:
      OS: macOS Sierra 10.12.5
      Shell: 5.2 - /bin/zsh
    Binaries:
      Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node
      Yarn: 1.7.0 - /usr/local/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v10.13.0/bin/npm
    npmPackages:
      @tarojs/async-await: 1.2.1 => 1.2.0
      @tarojs/components: 1.2.1 => 1.2.0
      @tarojs/plugin-babel: 1.2.1 => 1.2.0
      @tarojs/plugin-csso: 1.2.1 => 1.2.0
      @tarojs/plugin-sass: 1.2.1 => 1.2.0
      @tarojs/plugin-uglifyjs: 1.2.1 => 1.2.0
      @tarojs/redux: 1.2.1 => 1.2.0
      @tarojs/redux-h5: 1.2.1 => 1.2.0
      @tarojs/rn-runner: 1.2.1 => 1.2.0
      @tarojs/router: 1.2.1 => 1.2.0
      @tarojs/taro: 1.2.1 => 1.2.0
      @tarojs/taro-h5: 1.2.1 => 1.2.0
      @tarojs/taro-weapp: 1.2.1 => 1.2.0
      @tarojs/webpack-runner: 1.2.1 => 1.2.0
      eslint-config-taro: 1.2.1 => 1.2.0
      eslint-plugin-taro: 1.2.1 => 1.2.0

备注

目前正在换真机环境测试和Windows测试环境再试,排除操作系统因素。

@taro-bot
Copy link

taro-bot bot commented Dec 23, 2018

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@szy0syz
Copy link
Author

szy0syz commented Dec 23, 2018

哦,抱歉,我错了。
原因是我把API放在 componentDidShow 里了。
我在编完内容按 “submit new issue”前还纳闷,这是腾讯api,应该和taro没关系才对,手闲了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant