<block wx:if="{{item.blank}}">
<canvas id="canvas{{index}}" type="2d">
<cover-view class="canvas"
mark:id="drawboard{{index}}"
mark:cid="canvas{{index}}"
style="width: 350rpx; height: 350rpx;"
bindtouchstart="drawstart"
bindtouchmove="drawing"
bindtouchend="drawend"
bindtouchcancel="drawend"
binderror="drawend"
bind:longpress="clearWord"/>
</canvas>
</block>
let item = this.createSelectorQuery().select(`#canvas${this.blank_index[i]}`).fields({ node: true, size: true, rect: true })
console.log('错误发生前?',item)
item.exec(res => {
console.log(res, '??????')
const { width, height, left, top } = res[0]
const { dpr } = this.data
this[`canvas${this.blank_index[i]}`] = res[0].node
this[`drawboard${this.blank_index[i]}`] = this[`canvas${this.blank_index[i]}`].getContext('2d')
this[`canvas${this.blank_index[i]}`].width = width * dpr
this[`canvas${this.blank_index[i]}`].height = height * dpr
this[`canvas${this.blank_index[i]}`].left = left
this[`canvas${this.blank_index[i]}`].top = top
this[`drawboard${this.blank_index[i]}`].scale(dpr, dpr)
this[`drawboard${this.blank_index[i]}`].lineJoin = "round"
this[`drawboard${this.blank_index[i]}`].lineCap = "round"
this.clearDrawboard(this[`drawboard${this.blank_index[i]}`], this[`canvas${this.blank_index[i]}`])
})