18 lines
332 B
Vue
18 lines
332 B
Vue
|
<script setup>
|
||
|
const image = ref('');
|
||
|
import { showToast } from 'vant';
|
||
|
|
||
|
const onSubmit = (data) => {
|
||
|
image.value = data.image;
|
||
|
};
|
||
|
const onClear = () => showToast('clear');
|
||
|
</script>
|
||
|
|
||
|
<template>
|
||
|
<van-signature @submit="onSubmit" @clear="onClear" />
|
||
|
<van-image v-if="image" :src="image" />
|
||
|
</template>
|
||
|
|
||
|
<style scoped>
|
||
|
|
||
|
</style>
|