vue3使用SignaturePad电子签名,Base64转成 Blob 再转成 File上传文件

在这里插入图片描述

<template>
  <div>
    <div ref="canvasBox" style="border: 1px solid #eee">
      <canvas id="canvasId" />
    </div>
    <div class="btnBox">
      <el-button round type="primary" size="small" @click="clear">重签</el-button>
      <el-button round type="success" size="small" @click="save">确定</el-button>
    </div>
  </div>
</template>

<script setup>
import SignaturePad from 'signature_pad'
import { reactive, defineEmits, ref, onMounted } from 'vue'
import { ElNotification } from 'element-plus'

const emit = defineEmits(['getSignature'])
const props = defineProps({})
const canvasBox = ref()

const reactData = reactive({

猜你喜欢

转载自blog.csdn.net/weixin_43400431/article/details/128200149