**元旦将至,接到上级要求小程序生成元旦贺卡分享。(要求用户自主填写祝福语标题)
个人思路:选用元旦背景将用户填写内容画布生成。保存为图片海报**
一下为代码:
wxml:
<view>
<view style="width:100%;height:60rpx;"></view>
<view :style="style">
<view style=" display: flex;flex-direction: column;align-items: center;width:100%">
<view style="width:100%;height:260rpx;"></view>
<view style="width:60%;border-bottom:1px solid #ccc;margin-bottom:20rpx;"> <input type="text"
v-model="title"
class="form-control"
placeholder="标题(5-15字以内)" maxlength="15"/></view>
<view style="width:60%;margin-top:20rpx;border-bottom:1px solid #ccc">
<textarea v-if="xs" v-model="count"
:placeholder="ts"
placeholder-class="bhclass" style="width:100%;" maxlength="40"></textarea>
</view>
</view>
</view>
<view @click="formSubmit">
<button style="background-color: #ff6f3f;color: #fff;margin-top:4