We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在WePY框架下使用wxDraw时,报错,Hello world都做不到
Hello world
<canvas class="effect_canvas" canvas-id="effectCanvas" disable-scroll ></canvas>
import wepy from 'wepy' import { wxDraw as WxDraw, Shape } from '../plugins/wxdraw' export default class Index extends wepy.page { data = { wxCanvas: null } onLoad() { const context = wx.createCanvasContext('effectCanvas') this.wxCanvas = new WxDraw(context, 0, 0, 400, 500) } }
The text was updated successfully, but these errors were encountered:
自己解决了: 不能将wxCanvas放在data里,直接作为类属性即可(如下),data下的变量会被脏检查(此时会遇到问题)
wxCanvas
data
import wepy from 'wepy' import { wxDraw as WxDraw, Shape } from '../plugins/wxdraw' export default class Index extends wepy.page { wxCanvas = null onLoad() { const context = wx.createCanvasContext('effectCanvas') this.wxCanvas = new WxDraw(context, 0, 0, 400, 500) } }
Sorry, something went wrong.
在wepy中,试用了画一个rect并加动画,正常; 改为画一个图片,无显示,没有报错,不知道原因; 在同一个canvas画两个rect, 其中一个设了动画,只显示了设动画的那个,且动画不进行,另一个则不显示,原因未明;
第一次使用wxDraw,求助 @bobiscool @Blueria
No branches or pull requests
在WePY框架下使用wxDraw时,报错,
Hello world
都做不到使用大致如下:
报错如下:
The text was updated successfully, but these errors were encountered: