How to realize the function of saving picture component in Mini Program
< lineNum; i++) { let sliceText = text.slice(i * rowStrnum, (i + 1) * rowStrnum) // fillText 的 dx = 文字最左边的距离到屏幕政策的距离 context.fillText(sliceText, dx - textWidth, dy + i * lineHeight); } resolve(context) }) }, /** 将画布导出为图片 * @param canvasId 画布标识 */ canvasToImage(canvasId) { return new Promise((resolve, reject) =>