winchance

HTML:

<canvas canvas-id="canvasLine" v-show="!charImg" id="canvasLine" class="charts" disable-scroll="true" @touchstart="touchLine"
@touchmove="moveLine" @touchend="touchEndLine"></canvas>
<!-- image用来解决canvas组件层级过高问题 -->
<image v-if="charImg" :src="charImg" class="charts"></image>

Vue方法:

// 解决canvas层级过高,遮挡弹出层的问题;参考:https://blog.csdn.net/liya_nan/article/details/82023761
            handleCanvarToImg(that) {
                uni.canvasToTempFilePath({
                    x: 0,
                    y: 0,
                    width: uni.upx2px(702),
                    height: uni.upx2px(544),
                    canvasId: \'canvasLine\',
                    success: function(res) {
                        that.charImg = res.tempFilePath;
                        // console.log(\'that.charImg\',that.charImg);
                    }
                });
                
            }

参考:

https://blog.csdn.net/liya_nan/article/details/82023761

分类:

技术点:

相关文章:

  • 2021-12-05
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
  • 2022-12-23
  • 2021-09-16
  • 2022-12-23
猜你喜欢
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案