<template>
    <div>
        <el-upload
            action=""
            multiple
            class="upload-demo"
            drag
            list-type="picture"
            :http-request="onProgress"
            :on-success="onSuccess"
        >
            <i class="el-icon-upload"></i>
            <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
            <div class="el-upload__tip" slot="tip">只能上传jpg/png文件，且不超过500kb</div>
        </el-upload>
    </div>
</template>

<script>
export default {
    methods: {
        onProgress(e) {
            return true;
        },
        onSuccess(response, file, fileList) {
            console.log(fileList);
        }
    }
};
</script>

<style lang="less" scoped></style>
