微信小程序手写签字,点击弹出签字面板,可清除,签字确认之后展示签字图片

在这里插入图片描述
在这里插入图片描述

//wxml  页面

<view class="form-wrap form-item flex br5 bg-white pd15 flex-vertical-center border-b">
  <view class="label required">驾驶员签字</view>
  <view class="color-lightblack flex-con fs16 fake-placeholder" bindtap="signature">
    <view wx:if="{
    {!driverSignature}}">请驾驶员签字</view>
    <image wx:else id="imgSignature" src="{
    {imgSignature}}"></image>
  </view>
</view>
 
//签字面板弹窗
<transition name="fade">
    <view wx:if="{
    {show}}" class="modal-wrap flex flex-vertical flex-justify-end">
      <view class="signature-wrap">
        <view class="signature-title-wrap">
          <van-icon name="cross" class="aui-icon-close" bindtap="close"/>
          <text class="pd15 font19 inblock">请绘制您的签名</text>
        </view>
        <canvas 
          class="canvas" 
          id="canvas" 
          canvas-id="canvas" 
          disable-scroll="true" 
          bindtouchstart="canvasStart" 
          bindtouchmove="canvasMove" 
          bindtouchend="canvasEnd" 
          touchcancel="canvasEnd" 
          binderror="canvasIdErrorCallback">
        </canvas>
        <view class="flex flex-vertical-center pdlr15">
          <button type="default" style="margin-right: 40rpx;" class&
  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值