Sign 电子签名

... 2021-7-29 Less than 1 minute

# Sign 电子签名

兼容移动端和pc段

Tips

2.0.4+


结果
<avue-sign ref="sign"></avue-sign>
<el-button type="primary" @click="handleSubmit">生成</el-button>
<el-button type="danger" @click="$refs.sign.getStar('这里是用途','这里是单位的名称','123456')">图章</el-button>
<el-button @click="$refs.sign.clear()">清空</el-button>
<div>
<br />
  结果
  <img :src="img" alt="" width="80" height="50" />
</div>
<script>
export default {
    data() {
      return {
        img: ''
      }
    },
    methods: {
      handleSubmit() {
        this.img = this.$refs.sign.submit(80, 50);
        console.log(this.img)
      }
    }
}
</script>


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Expand Copy
Last update: August 14, 2024 15:38
Contributors: smallwei
您正在浏览基于 Vue 2.x 的 Avue 文档; 点击这里 查看 Vue 3.x 的升级版本