<el-dialog
:title="mainTitle"
:visible.sync="editVisible"
:modal-append-to-body="false"
width="840px"
@open="dlgOpen"
@closed="dlgClosed"
:close-on-click-modal="false"
>
<div id="app">
<div class="container">
<div class="row">
<div class="col-12 mt-2">
<VueSignaturePad
id="signature"
width="95%"
height="400px"
ref="signaturePad"
:options="options"
/>
</div>
</div>
<el-row>
<el-col :span="4">
<div class="grid-content bg-purple">
<el-button type="primary" plain @click="undo">撤销</el-button> </div>
</el-col>
<el-col :span="4"
><div class="grid-content bg-purple-light">
<el-button type="success" plain @click="save">保存</el-button> </div>
</el-col>
<el-col :span="4"
><div class="grid-content bg-purple">
<el-button type="warning" plain @click="change">换⾊</el-button> </div>
</el-col>
<el-col :span="4"
><div class="grid-content bg-purple-light">
<el-button type="danger" plain @click="resume">重置</el-button> </div>
</el-col>
<el-col :span="4"
><div class="grid-content">
<el-button type="danger" plain @click="close">关闭</el-button>
</div>
</el-col>
</el-row>
</div>
</div>
</el-dialog>
</template>
<script>
export default {
data() {
return {
editVisible: false,
mainTitle: "⽤户签名",
options: {
penColor: "#000",
},
};
},
methods: {
init(id) {
this.editVisible = true;
},
undo() {
this.$refs.signaturePad.undoSignature();
},
electron vue教程save() {
const { isEmpty, data } = this.$refs.signaturePad.saveSignature();
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论