mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-04-05 19:41:51 +08:00
32 lines
810 B
Vue
32 lines
810 B
Vue
<template>
|
|
<div class="components-container">
|
|
<code>
|
|
Based on <a class="link-type" href="https://github.com/rowanwins/vue-dropzone"> dropzone </a>.
|
|
{{ $t('components.dropzoneTips') }}
|
|
</code>
|
|
<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>
|
|
|