1. 程式人生 > 其它 >vue 資料匯入載入樣式

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