弹窗防止滑动和穿透
catchtouchmove='true' @touchmove.prevent="stopPrevent"
stopPrevent() {},
海报画布:
<view class="poster" v-if="showposter" @click.stop.prevent="stopPrevent">
<canvas canvas-id="myCanvas":style="'width:' +windowWidth+'px;height:'+windowHeight+'px;position:absolute;top:5%;left:10%;background- color:#fff;overflow:hidden'" />
<view class="save">
<text class="saveimg" @click="toSave()">保存图片</text>
<text class="cancel" @click="sharePoster()">取消</text>
</view>
</view>
获取设备的尺寸:
canvas不支持渲染网络图片,要将网络图片先下载到本地,