Kaynağa Gözat

上传文件样式

chenwj 5 yıl önce
ebeveyn
işleme
091cb8a8ab
1 değiştirilmiş dosya ile 16 ekleme ve 15 silme
  1. 16 15
      src/components/excel/cy-excel-import.vue

+ 16 - 15
src/components/excel/cy-excel-import.vue

@@ -2,26 +2,27 @@
     <span>
       <el-button icon="el-icon-download" @click="dialogVisible = true" size="small" plain>导入</el-button>
       <el-dialog title="导入" :visible.sync="dialogVisible" width="30%" :modal-append-to-body="false" append-to-body center>
-        <div style="text-align: center;">
-          <el-button style="margin-right: 10px;" icon="el-icon-download" size="small" plain @click="download">下载模板</el-button>
+          <el-row type="flex" justify="center">
+            <el-col :span="5">
+              <el-button style="margin-right: 10px" icon="el-icon-download" size="small" plain @click="download">下载模板</el-button>
+            </el-col>
+            <el-col :span="10">
+              <el-upload
+                :multiple="false"
+                :auto-upload="false"
+                :before-upload="beforeUpload"
+                :on-success="onSuccess"
+                :on-error="onError"
+                :disabled="importDisabled"
+                :on-change="selectFile"
 
-          <el-upload
-            :show-file-list="false"
-            :multiple="false"
-            :auto-upload="false"
-            :before-upload="beforeUpload"
-            :on-success="onSuccess"
-            :on-error="onError"
-            :disabled="importDisabled"
-            :on-change="selectFile"
-
-            style="display: inline-flex;margin-right: 10px;"
-            action="/api/common/excel/importExcel">
+                action="/api/common/excel/importExcel">
 
             <el-button slot="trigger" size="small" type="primary" icon="el-icon-document-add">选取文件</el-button>
             <el-button style="margin-left: 10px;" size="small" type="success" :disabled="!file" :icon="importDataIcon" @click="submitUpload">{{importDataText}}</el-button>
           </el-upload>
-          </div>
+            </el-col>
+          </el-row>
       </el-dialog>
 
     </span>