同求
T
tinico 发布的帖子
-
RE: 编译运行一步一个坑,你们的破文档能改改吗?
@Taro-小助手-honly 我头一天是用的dev:h5,第二天用成build:h5了,结果就说编译文件过大,暂时还没研究这个问题,我现在都用dev:h5就可以
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance. Entrypoints: app (306 KiB) css/app.css js/app.js
-
RE: TypeError: Cannot read property 'isRoute' of undefined
@Taro-小助手-honly 可以了,原因是componentDidMount执行了两次,执行第二次时会报错
componentDidMount() { if (process.env.TARO_ENV === 'h5') { if (this['__taroref_canvas']) { this.canvas = Taro.createCanvasContext('canvas', this); } } }
而且很奇怪的是明明componentDidMount已经取得了canvas了,但是componentDidShow里面使用canvas却未定义
componentDidShow() { console.log(this.canvas) // undefined }