const ganvas = this.$refs['gcanvess'];
this.canvasObj = enable(ganvas, {
bridge: WeexBridge
});
this.context = this.canvasObj.getContext('2d');
const ctx = this.context;
console.log(ctx)
ctx.drawImage(
'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Finews.gtimg.com%2Fnewsapp_match%2F0%2F10548990761%2F0.jpg&refer=http%3A%2F%2Finews.gtimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1631085943&t=7e86ef0276726e7d2a5ed21f5822c1ad',
0,
0,);
ctx.setFontSize(40)
ctx.fillText('这是个中文', 00,0)
ctx.draw(false)
- 发布:2021-08-09 15:29
- 更新:2021-08-09 15:40
- 阅读:403
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win10
HBuilderX类型: 正式
HBuilderX版本号: 3.1.18
手机系统: Android
手机系统版本号: Android 10
手机厂商: 华为
手机机型: 华为手机
页面类型: nvue
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
直接吧官方demo复制粘贴
直接吧官方demo复制粘贴
预期结果:
显示中文
显示中文
实际结果:
英文正常显示,但是中文不会显示
英文正常显示,但是中文不会显示
bug描述:
使用ctx.fillText('中文字题', 0,0)不显示
使用ctx.fillText('英文字题', 0,0)显示
英文正常显示,但是中文不会显示
这BUG这么明显,怎么还能发布当插件。。
1 个回复
陌上华年
官方都不推荐使用。。。