1. The first thing that comes to mind is the hidden attribute. Setting it will cause the drawing of canves to fail
2. Add a layer of view to the direct child node of the page and hide the view setting.
<view style='width:0px;height:0px;overflow:hidden;'>
<canvas canvas-id='canone'></canvas>
</view>
3. Set the css attribute of canves
https://developers.weixin.qq.com/community/develop/doc/1aadfacdd9f38584881e0c50db2bcda1