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 中使用 wxml-to-canvas #7175

Closed
BackToHappyBear opened this issue Jul 27, 2020 · 6 comments
Closed

无法在 Taro 中使用 wxml-to-canvas #7175

BackToHappyBear opened this issue Jul 27, 2020 · 6 comments
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@BackToHappyBear
Copy link

相关平台

微信小程序

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

复现步骤

引用 wxml-to-canvas,this.$scope.selectComponent 无法拿到组件实例

期望结果

在 Taro 中使用 wxml-to-canvas

实际结果

无法再 Taro 中使用 wxml-to-canvas

环境信息

👽 Taro v2.2.9


  Taro CLI 2.2.9 environment info:
    System:
      OS: macOS 10.15.6
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 12.16.2 - /usr/local/bin/node
      Yarn: 1.22.4 - /usr/local/bin/yarn
      npm: 6.14.4 - /usr/local/bin/npm
    npmPackages:
      @tarojs/components: 2.2.9 => 2.2.9 
      @tarojs/components-qa: 2.2.9 => 2.2.9 
      @tarojs/mini-runner: 2.2.9 => 2.2.9 
      @tarojs/plugin-sass: 2.2.9 => 2.2.9 
      @tarojs/plugin-terser: 2.2.9 => 2.2.9 
      @tarojs/router: 2.2.9 => 2.2.9 
      @tarojs/taro: 2.2.9 => 2.2.9 
      @tarojs/taro-alipay: 2.2.9 => 2.2.9 
      @tarojs/taro-h5: 2.2.9 => 2.2.9 
      @tarojs/taro-qq: 2.2.9 => 2.2.9 
      @tarojs/taro-quickapp: 2.2.9 => 2.2.9 
      @tarojs/taro-rn: 2.2.9 => 2.2.9 
      @tarojs/taro-swan: 2.2.9 => 2.2.9 
      @tarojs/taro-tt: 2.2.9 => 2.2.9 
      @tarojs/taro-weapp: 2.2.9 => 2.2.9 
      @tarojs/webpack-runner: 2.2.9 => 2.2.9 
      eslint-config-taro: 2.2.9 => 2.2.9 
      eslint-plugin-taro: 2.2.9 => 2.2.9 
      nerv-devtools: ^1.5.5 => 1.5.7 
      nervjs: ^1.5.5 => 1.5.7 
      stylelint-config-taro-rn: 2.2.9 => 2.2.9 
      stylelint-taro-rn: 2.2.9 => 2.2.9 
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Jul 27, 2020
@JX-Zhuang
Copy link

怎么解决的,taro 3.0.9 不能使用selectComponent

@j78742
Copy link

j78742 commented Dec 28, 2020

你这个版本不会每次设置setState刷新吗?

@jacktang
Copy link

@BackToHappyBear 最后怎么搞定的?

@Tonysmark
Copy link

有任何进展吗

@yaodongyi
Copy link

还是没有解决

@xiaodel
Copy link

xiaodel commented Apr 1, 2023

我使用Wxml2Canvas 发现Image标签无法添加自定义属性(会被抹掉),也是无解了

  <Image
              data-type="image"
              data-url="https://static.shjmall.cn/applet/home/rank_logo@2x.png"
              className="rank-top-logo draw_canvas"
              mode="widthFix"
              src="https://static.shjmall.cn/applet/home/rank_logo@2x.png"
            ></Image>

data-type、data-url属性编译后会被抹掉

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

7 participants