ZaiZai 1 rok temu
rodzic
commit
aface661ac

+ 1 - 1
components/hc-image/index.vue

@@ -1,6 +1,6 @@
 <template>
     <view class="hc-image-view" :style="{'background-image': srcs}">
-        <image class="image-bar" :src="url" @error="imgError" @load="imgLoad"/>
+        <image class="image-bar" lazy-load :src="url" @error="imgError" @load="imgLoad"/>
         <view class="bg-gray-1 hc-flex-center h-full radius" v-if="!isImage">
             <view class="p-1 text-gray-4">
                 <view class="text-40 text-center">

+ 6 - 4
components/hc-img/index.vue

@@ -1,11 +1,13 @@
 <template>
     <view class="hc-img-view" :style="{'width':widths,'height':heights,'aspect-ratio':aspectRatio,'background-image':srcs}">
         <image class="image-bar" :src="url" @error="imgError" @load="imgLoad"/>
-        <view class="bg-gray-1" v-if="!isImage">
-            <view class="text-40 text-center">
-                <text class="i-ri-emotion-sad-line"/>
+        <view class="bg-gray-1 hc-flex-center h-full radius" v-if="!isImage">
+            <view class="p-1 text-gray-4">
+                <view class="text-40 text-center">
+                    <text class="i-ri-emotion-sad-line"/>
+                </view>
+                <view class="text-22">加载失败</view>
             </view>
-            <view class="text-22 mt-1">加载失败</view>
         </view>
     </view>
 </template>

+ 13 - 11
pages/work-order/index.vue

@@ -23,17 +23,19 @@
                     </view>
                     <view class="relative ml-12.5 text-gray-5">
                         <view class="relative mt-3" v-html="item.opinionContent"/>
-                        <hc-row :gutter="10" class="mt-3" v-if="item.returnFiles?.length > 0">
-                            <hc-col :span="8" class="h-125" v-for="(img, index) in item['returnFiles']">
-                                <hc-image class="radius" un-border="1 solid gray-2" :src="img"/>
-                            </hc-col>
-                            <hc-col :span="8" class="h-125" v-for="(img, index) in item['returnFiles']">
-                                <hc-image class="radius" un-border="1 solid gray-2" :src="img"/>
-                            </hc-col>
-                            <hc-col :span="8" class="h-125" v-for="(img, index) in item['returnFiles']">
-                                <hc-image class="radius" un-border="1 solid gray-2" :src="img"/>
-                            </hc-col>
-                        </hc-row>
+                        <view class="mt-3" v-if="item.returnFiles?.length > 0">
+                            <hc-row :gutter="10">
+                                <hc-col :span="8" class="h-125" v-for="(img, index) in item['returnFiles']">
+                                    <hc-image class="radius" un-border="1 solid gray-2" :src="img"/>
+                                </hc-col>
+                                <hc-col :span="8" class="h-125" v-for="(img, index) in item['returnFiles']">
+                                    <hc-image class="radius" un-border="1 solid gray-2" :src="img"/>
+                                </hc-col>
+                                <hc-col :span="8" class="h-125" v-for="(img, index) in item['returnFiles']">
+                                    <hc-image class="radius" un-border="1 solid gray-2" :src="img"/>
+                                </hc-col>
+                            </hc-row>
+                        </view>
                     </view>
                 </view>
             </template>