Blame view
src/views/components-demo/dropzone.vue
812 Bytes
d7d9c38c2 auto commit the c... |
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 27 28 29 30 |
<template> <div class="components-container"> <aside> Based on <a class="link-type" href="https://github.com/rowanwins/vue-dropzone"> dropzone </a>. {{ $t('components.dropzoneTips') }} </aside> <div class="editor-container"> <dropzone id="myVueDropzone" url="https://httpbin.org/post" @dropzone-removedFile="dropzoneR" @dropzone-success="dropzoneS" /> </div> </div> </template> <script> import Dropzone from '@/components/Dropzone' export default { name: 'DropzoneDemo', components: { Dropzone }, methods: { dropzoneS(file) { console.log(file) this.$message({ message: 'Upload success', type: 'success' }) }, dropzoneR(file) { console.log(file) this.$message({ message: 'Delete success', type: 'success' }) } } } </script> |