elementui:
<el-button size="small" type="primary" icon="el-icon-plus" @click="exportExcel()">导出Excel</el-button> <el-button size="small" type="primary" icon="el-icon-plus" @click="importvis=true">导入Excel</el-button>
<div style="float:left;margin-left: 10px;margin-bottom: 5px"> <el-button size="small" type="primary" icon="el-icon-edit" @click="edit1=true">增加</el-button> <el-button size="small" type="primary" icon="el-icon-plus" @click="exportExcel()">导出Excel</el-button> <el-button size="small" type="primary" icon="el-icon-plus" @click="importvis=true">导入Excel</el-button> </div>
data:
importvis:false,
methods:
/** * 创建完毕 */ // created() { // this.getdata() // }, // 导出 exportExcel(){ location.href="http://localhost:8282/api/content/export"; }, // 上传 upload(res){ if(res.code==0){ //成功 this.importvis=false; // this.getdata(this.formInline); alert("上传成功") }else { this.$message({ type: 'warning', message: '嗨,导入失败!!!!' }) } },