Przeglądaj źródła

选择产品缺省图

zhaoxiaohai 3 lat temu
rodzic
commit
00d30dc67b

+ 9 - 0
packageA/select/product/select.scss

@@ -35,6 +35,15 @@ page {
             border-radius: 16rpx;
             margin-right: 30rpx;
             overflow: hidden;
+
+            .default{
+                width: 100%;
+                line-height: 120rpx;
+                text-align: center;
+                border:1px solid #ddd;
+                box-sizing: border-box;
+                font-size: 22rpx;
+            }
         }
 
         .dec {

+ 4 - 2
packageA/select/product/select.wxml

@@ -6,10 +6,12 @@
         <view class="mian">
             <van-checkbox wx:if="{{!radio}}" value="{{ handle.isCheck(item[idname],result) }}" shape="square" icon-size='28rpx' />
             <view class="img" data-file="{{item.attinfos}}" catchtap="viewImage">
-                <van-image width="100%" height="100%" src="{{item.cover}}" use-loading-slot use-error-slot lazy-load>
+                <van-image wx:if="{{item.cover}}" width="100%" height="100%" src="{{item.cover}}" use-loading-slot use-error-slot lazy-load>
                     <van-loading slot="loading" type="spinner" size="20" vertical />
-                    <text slot="error" style="font-size: 24rpx;">暂无图片</text>
                 </van-image>
+                <view wx:else class="default">
+                    暂无图片
+                </view>
             </view>
             <view class="dec">
                 <view class="title line-1">