<template>
    <el-upload
            class="upload-demo"
            action="#"
            :on-remove="fileRemoveHandle4"
            :on-change="fileChangeHandle4"
            accept=""
            :auto-upload="false"
            multiple
            :file-list="form.instFilePics"
            ref="uploadFile">
            <el-button size="small" type="primary" :title="form.instFile.length == 0 || !form.instFile  ? '请先上传Md文件' : ''">
                <i class="el-icon-folder-opened"></i>
            </el-button>
    </el-upload>
</template>

<script>
    export default {
        name: "uploadFile",
        data(){
            return {
                form:{
                    instFilePics:[],
                    instFile:[]
                }
            }
        },
        mounted() {
            this.$refs.uploadFile.$children[0].$refs.input.webkitdirectory = true;
        },
        methods:{
            // 使用说明文档 路径
            fileChangeHandle4(file, fileList, name) {
                this.form.instFilePics = fileList
            },
            // 使用说明文档 路径
            fileRemoveHandle4(file, fileList, name) {
                // if (file.id) {
                //     this.instFilePics.push(file.id);
                // }
                this.form.instFilePics = fileList
            },

        }

    }
</script>

<style scoped>

</style>
GitHub 加速计划 / eleme / element
10
1
下载
A Vue.js 2.0 UI Toolkit for Web
最近提交(Master分支:4 个月前 )
c345bb45 8 个月前
a07f3a59 * Update transition.md * Update table.md * Update transition.md * Update table.md * Update transition.md * Update table.md * Update table.md * Update transition.md * Update popover.md 8 个月前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐