tiny-vue/examples/sites/demos/mobile-first/app/signature/preview.vue

31 lines
538 B
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div>
<div class="h-72">
<tiny-signature @submit="submit"></tiny-signature>
</div>
<h4 class="mt-5 text-base font-bold">点击确认按钮生成预览图片</h4>
<tiny-image :src="url"></tiny-image>
</div>
</template>
<script>
import { Signature, Image } from '@opentiny/vue'
export default {
components: {
TinySignature: Signature,
TinyImage: Image
},
data() {
return {
url: ''
}
},
methods: {
submit({ image }) {
this.url = image
}
}
}
</script>