赞
踩
<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>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。