Quellcode durchsuchen

盲票列表图片尺寸调整

DELL vor 3 Jahren
Ursprung
Commit
3313c0b9e5
2 geänderte Dateien mit 19 neuen und 7 gelöschten Zeilen
  1. 18 6
      src/views/business/ticket/detail.vue
  2. 1 1
      src/views/business/ticket/index.vue

+ 18 - 6
src/views/business/ticket/detail.vue

@@ -12,11 +12,11 @@
           {{ info && info.title }}
         </el-form-item>
         <el-form-item label="图片:">
-          <el-image
-            style="width: 110px; height: 150px"
-            :src="info && info.picUrl"
-            :preview-src-list="[info && info.picUrl]"
-          />
+          <div class="picUrl">
+            <div class="picUrl-item" v-for="(item,index) in info.picUrl" :key="index">
+              <el-image style="width: 70px; height: 80px" :src="item" :preview-src-list="info.picUrl"/>
+            </div>
+          </div>
         </el-form-item>
         <el-form-item label="面值:">
           <span :class="loading ? 'el-icon-loading' : ''"></span>
@@ -127,10 +127,15 @@ export default {
           this.loading = false;
           if (res.code == 0) {
             let data = res.data;
+
+            let picUrl = []
+            data.picUrl.split(",").forEach(res=>{
+              picUrl.push(publicFileGetUrl + res)
+            })
             this.info = {
               ...data,
               type: JSON.parse(data.type),
-              picUrl: publicFileGetUrl + data.picUrl,
+              picUrl: picUrl,
               channelTitle: data.channelList.map(item => item.name).join(',')
             };
             data.awardsList.forEach((item) => {
@@ -189,4 +194,11 @@ export default {
     }
   }
 }
+
+.picUrl {
+  display: flex;
+  &-item {
+    margin-right: 40px;
+  }
+}
 </style>

+ 1 - 1
src/views/business/ticket/index.vue

@@ -133,7 +133,7 @@
         <template slot-scope="scope">
           <div>
             <el-image
-              style="width: 110px; height: 150px"
+              style="width: 70px; height: 80px"
               :src="scope.row.picUrl"
               :preview-src-list="[scope.row.picUrl]"
             />