el-upload-repackage
v0.2.8
Published
It is an upload component base on ElementUI
Downloads
16
Maintainers
Readme
el-upload-repackage
Make sure you have installed el-upload
How to use?
npm install el-upload-repackage
Example
<template>
<div id="app">
<upload :limit="3" :size="5" @handle-prepare="handlePrepareFiles" />
</div>
</template>
<script>
import Upload from 'el-upload-repackage'
export default {
name: 'ElUploadRepackage',
components: {
Upload
},
methods: {
handlePrepareFiles(files) {
console.log(files)
}
}
}
</script>
Options
| Property | Description | type | default | | ----------------- | ---------------- | :--------: | :----------: | | drag | whether to activate drag and drop mode |Boolean| true | | multiple | whether uploading multiple files is permitted |Boolean | false | | limit | maximum number of uploads allowed | Number | 1 | | accept | accepted file types | String | jpg/png | | size | maximum size of uploads allowed | Number | 2 | | list-type | type of fileList(text/picture/picture-card) | String | picture | | provide-template | whether to provide a document template | Boolean | false | | template-path | template download path (you better put your template file in the static resources folder | String | template/template.xlsx |
Customize configuration
See Configuration Reference about of ElementUI.