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

#Feature# H5端的支持 #25

Open
BinZhiZhu opened this issue Dec 5, 2019 · 3 comments
Open

#Feature# H5端的支持 #25

BinZhiZhu opened this issue Dec 5, 2019 · 3 comments

Comments

@BinZhiZhu
Copy link

最近想兼容到h5,所以我看了一下作者源码,想尝试fix,但是遇到一个问题就是:

1.downImage的时候需要区分下env做不同的处理,Taro.env.USER_DATA_PATH貌似是不支持的,所以肯定有问题
2.createCanvasContext的问题:

H5端应该是直接传this实例,this.$scope是undefined的

    console.log('this.vnode',this.vnode)
    this.ctx = Taro.createCanvasContext(this.canvasId, this);

然后发现:
image

我在taro提了个issue,不知道是否可以fix,如果可以解决这个问题,还是可以支持h5的呢

@BinZhiZhu
Copy link
Author

NervJS/taro#5011

@chuyun
Copy link
Owner

chuyun commented Dec 16, 2019

@BinZhiZhu H5端理论上不需要去downloadImage,这个可以单独处理下,
NervJS 的 createCanvasContext 问题我有空看下源码哈,
小程序和H5的 Canvas 一些 API 存在差异性,需要支持 H5 的话还需要加一层适配层。
欢迎提Pr哈 🌹🌹🌹

@QWCY
Copy link

QWCY commented Jun 1, 2020

taro-plugin-canvas 这个组件兼容H5端吗

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

No branches or pull requests

3 participants