element 上传文件 upload
<el-dialog title="上传文件" :visible.sync="upload_dialog" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false" width="500px" > <el-upload class="upload-demo" ref="upload" drag accept=".csv" action="" :multiple="false" :limit="1" :auto-upload="false" :on-change="handle_csv_change" > <i class="el-icon-upload"></i> <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> <div class="el-upload__tip" slot="tip">只能上传.csv文件</div> </el-upload> <span slot="footer" class="dialog-footer"> <el-button @click="cancel('upload_csv')">取 消</el-button> <el-button type="primary" @click="determine_upload">确 定</el-button> </span> </el-dialog>