You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vue-upload-component/example/CrossRouterUpload.vue

42 lines
822 B

<template>
<div>
<div class="upload-btn">
<file-upload
title="Add upload files"
name="file"
post-action="/post"
put-action="/put"
:multiple="true"
:files="files"
ref="upload">
</file-upload>
<button v-show="!upload.active" @click.prevent="upload.active = true" type="button">Start upload</button>
<button v-show="upload.active" @click.prevent="upload.active = false" type="button">Stop upload</button>
</div>
</div>
</template>
<script>
import FileUpload from '../src'
export default {
components: {
FileUpload,
},
props: {
files: {
type: Array,
default: () => [],
},
},
data() {
return {
upload: {},
}
},
mounted() {
this.upload = this.$refs.upload.$data
}
}
</script>