Ver Fonte

fix: 分类网格去掉蒙版背景,图标直接放到蒙版大小

112rpx 圆形容器内不再渲染 bgImageUrl,图标改为 96rpx(接近蒙版尺寸)
居中显示,简化设计:管理员只需配图标,无需额外准备蒙版素材。
Developer há 5 dias atrás
pai
commit
ed001aa63c
1 ficheiros alterados com 3 adições e 7 exclusões
  1. 3 7
      pages/home.vue

+ 3 - 7
pages/home.vue

@@ -39,7 +39,7 @@
 			</view>
 			<view class="c-box-typegrid" v-if="typeGrid.length">
 				<view class="typegrid-item adffc" v-for="(item,index) in typeGrid" :key="item.id" :style="{'margin-right':(index+1)%4===0?'0':'20rpx'}" @click="changeType(item,index)">
-					<view class="typegrid-circle" :style="item.bgImageUrl?{backgroundImage:`url(${item.bgImageUrl})`,backgroundSize:'100% 100%'}:{}">
+					<view class="typegrid-circle">
 						<image v-if="item.iconUrl" :src="item.iconUrl" mode="aspectFit"></image>
 					</view>
 					<view class="typegrid-name">{{item.name}}</view>
@@ -389,16 +389,12 @@
 					.typegrid-circle{
 						width: 112rpx;
 						height: 112rpx;
-						border-radius: 50%;
-						background: #F4F8FF;
-						background-repeat: no-repeat;
-						background-position: center;
 						display: flex;
 						align-items: center;
 						justify-content: center;
 						image{
-							width: 56rpx;
-							height: 56rpx;
+							width: 96rpx;
+							height: 96rpx;
 						}
 					}
 					.typegrid-name{