vue 数据导入加载样式
<el-form :inline="true" size="small">
<el-col :span="2">
<el-upload
class="margin-left"
ref="upload"
:action="action"
:before-upload="importLoad"
:on-success="handleSuccess"
:on-error="handleError"
:show-file-list="false"
:accept="fileAccept">
<el-button type="primary" v-loading.fullscreen.lock="importLoading" :size="size">导入</el-button>
</el-upload>
</el-col>
<el-col :span="2">
<el-button type="primary" class="margin-bottom" :size="size" @click="downloadTemplate">模板下载</el-button>
</el-col>
</el-form>
importLoad() {
this.importLoading = true
},
handleSuccess(res, file, fileList) {
if(res.code === 200) {
this.importData = res.data
this.importDataTotal = res.data.length
this.importDialog = true
this.importLoading = false
} else {
this.importLoading = false
this.$message.error(res.message)
}
},
handleError(res){
this.importLoading = false
this.$message.error(res.message)
},
v-loading.fullscreen.lock

浙公网安备 33010602011771号