微信小程序組件內(component)canvas元素的坑 canvasToTempFilePath: fail canvas is empty

首先你會發現畫布畫不上…查看文檔第二個參數要傳入this。 canvasToTempFilePath: fail canvas is empty , 報這個錯是因爲調取 wx.canvasToTempFilePath 接口獲取不到canvas,同樣的需要傳入上下文的this wx.canvasToTempFilePath({ height: '430', c
相關文章
相關標籤/搜索