hurx 12 hodín pred
rodič
commit
f455f62d3a

+ 3 - 3
src/views/order/orderReturn/returnDetail.vue

@@ -31,15 +31,15 @@
         </el-descriptions-item>
 
         <el-descriptions-item label="凭证照片" :span="2">
-          <div v-if="orderDetail.voucherPhoto && orderDetail.voucherPhoto.length > 0">
+          <!-- 确保 split(',') 将字符串转为数组进行遍历 -->
+          <div v-if="orderDetail.voucherPhoto">
             <el-image
-              v-for="(url, index) in orderDetail.voucherPhoto"
+              v-for="(url, index) in orderDetail.voucherPhoto.split(',')"
               :key="index"
               :src="url"
               :preview-src-list="orderDetail.voucherPhoto.split(',')"
               style="width: 80px; height: 80px; margin-right: 8px; object-fit: cover"
               fit="cover"
-              :initial-index="index"
             />
           </div>
           <span v-else>无</span>