<template>
<view>
<!-- -->
<view class="share">
<view :class="{'share-box': shareState}" @click="places">
</view>
<view class="share-item" :class="{'share-show': shareState}">
<view class="share-to">
<image @click="places" src="../../../static/my/ic_guan.png" mode=""></image>
</view>
<!-- -->
<view class="fenximg gui-flex gui-justify-content-center">
<canvas style="width: 346px;height: 500px;position: fixed;opacity: 0;" class="canvas"
canvas-id="canvasID"></canvas>
<image :src="imgUrl" mode=""></image>
</view>
<!-- -->
<view class="" style="height: 160rpx;"></view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
shareState: true,
imgUrl: '',
statusBarHeight: 0,
hello: '../../../static/logo.png', // hello图标
cname: '111',
}
},
onLoad(option) {
this.ss()
},
methods: {
ss() {
var that = this
this.$nextTick(() => {
uniapp 使用canvas 生成海报并保存到本地
于 2022-06-21 10:27:20 首次发布