From a04dbad7fd08edd94a7627b31640076ecf1a07ac Mon Sep 17 00:00:00 2001 From: taiyuan Date: Sat, 27 Nov 2021 17:51:05 +0800 Subject: [PATCH] 小程序自定义模板中 商品分组和秒杀模块 商品名称以两行显示,溢出省略 --- components/diy_goodsGroup/diy_goodsGroup.wxml | 14 ++++++++++---- components/diy_goodsGroup/diy_goodsGroup.wxss | 70 ++++++++++++++++++++++++++++++++++++++++++++-------------------------- components/diy_seckill/diy_seckill.wxml | 4 ++-- components/diy_seckill/diy_seckill.wxss | 29 +++++++++++++++++++---------- 4 files changed, 75 insertions(+), 42 deletions(-) diff --git a/components/diy_goodsGroup/diy_goodsGroup.wxml b/components/diy_goodsGroup/diy_goodsGroup.wxml index 849c7a7..53b91cc 100644 --- a/components/diy_goodsGroup/diy_goodsGroup.wxml +++ b/components/diy_goodsGroup/diy_goodsGroup.wxml @@ -208,7 +208,7 @@ - {{item.goods_name}} + {{item.goods_name}} @@ -498,9 +498,15 @@ - + + + + + binderror="bind_bnerr3" mode="widthFix"> @@ -523,7 +529,7 @@ - {{item.goods_name}} + {{item.goods_name}} diff --git a/components/diy_goodsGroup/diy_goodsGroup.wxss b/components/diy_goodsGroup/diy_goodsGroup.wxss index 0895c9f..5cdcef6 100644 --- a/components/diy_goodsGroup/diy_goodsGroup.wxss +++ b/components/diy_goodsGroup/diy_goodsGroup.wxss @@ -123,12 +123,15 @@ } .zs_goods_xiao_bottom { - width: 100%; - min-height: 300rpx; + /* width: 100%; */ + /* min-height: 300rpx; */ display: flex; border-bottom: 2rpx #eee solid; - padding: 10rpx; + /* padding: 10rpx; */ background-color: white; + padding: 20rpx; + /* background-color: pink; */ + box-sizing: border-box; } .zs_goods_xiao { @@ -141,17 +144,17 @@ } .zs_top_x { - width: 400rpx; - height: 318rpx; - margin-top: 20rpx; - display: flex; + /* width: 400rpx; + height: 318rpx; */ + /* margin-top: 20rpx; */ + /* display: flex; */ position: relative; } .zs_t_img_x { width: 290rpx; height: 290rpx; - margin-left: 20rpx; + /* margin-left: 20rpx; */ } .zs_t_img_x.zj{ border: 1rpx solid #eee;} @@ -159,22 +162,24 @@ .zs_center_x { - width: 100%; - min-height: 200rpx; + /* width: 100%; + min-height: 200rpx; */ font-size: 28rpx; color: #333; - text-align: left; - margin-top: 30rpx; - padding: 0 10rpx; + padding-left: 20rpx; + /* text-align: left; */ + /* margin-top: 30rpx; + padding: 0 10rpx; */ } .zs_wz1_x { - overflow: hidden; - text-overflow: ellipsis; + /* overflow: hidden; + text-overflow: ellipsis; */ + height: 90rpx; margin-bottom: 10rpx; font-size: 28rpx; - white-space: nowrap; - width: 80%; + /* white-space: nowrap; + width: 80%; */ } .zs_wz2_x { @@ -229,10 +234,11 @@ } .zs_t1_x1 { + position: absolute; width: 56rpx; height: 56rpx; - position: relative; - right: 285rpx; + /* position: relative; */ + left: 6rpx; top: 6rpx; } @@ -302,16 +308,16 @@ font-size: 28rpx; color: #333; text-align: left; - padding: 0 10rpx; + /* padding: 0 10rpx; */ } .zs_wz1_2l { - overflow: hidden; - text-overflow: ellipsis; + /* overflow: hidden; + text-overflow: ellipsis; */ font-size: 28rpx; - white-space: nowrap; - height: 40rpx; - line-height: 40rpx; + /* white-space: nowrap; */ + height: 90rpx; + /* line-height: 40rpx; */ margin-top: 10rpx; } @@ -825,4 +831,16 @@ top: 10rpx; bottom: 10rpx; } -.n_box{ position: absolute !important;z-index: 10} \ No newline at end of file +.n_box{ position: absolute !important;z-index: 10} + +.block { + display: block; +} + +.ellipsis-2 { + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} \ No newline at end of file diff --git a/components/diy_seckill/diy_seckill.wxml b/components/diy_seckill/diy_seckill.wxml index 3892d1b..ceafe44 100644 --- a/components/diy_seckill/diy_seckill.wxml +++ b/components/diy_seckill/diy_seckill.wxml @@ -62,7 +62,7 @@ - {{aitem.goods_name}} + {{aitem.goods_name}} ¥{{aitem.price}} ¥{{aitem.market_price}} @@ -85,7 +85,7 @@ - {{aitem.title}} + {{aitem.title}} {{aitem.djs.day}}{{aitem.djs.hou}} : diff --git a/components/diy_seckill/diy_seckill.wxss b/components/diy_seckill/diy_seckill.wxss index 6ebabda..a770d0a 100644 --- a/components/diy_seckill/diy_seckill.wxss +++ b/components/diy_seckill/diy_seckill.wxss @@ -112,13 +112,13 @@ swiper { font-size: 30rpx; border-bottom: 2rpx solid #dcdcdc; width: 100%; - text-align: left; + /* text-align: left; */ padding: 4rpx 0; - overflow: hidden; - height: 48rpx; - text-overflow: ellipsis; + /* overflow: hidden; */ + height: 90rpx; + /* text-overflow: ellipsis; white-space: nowrap; - line-height: 48rpx; + line-height: 48rpx; */ } .sp_wz .sp_jg { @@ -222,12 +222,12 @@ swiper { .o1_right .sp_wzi { font-size: 30rpx; margin-bottom: 6rpx; - text-align: left; + /* text-align: left; */ padding: 4rpx 0; - height: 48rpx; - overflow: hidden; + height: 90rpx; + /* overflow: hidden; white-space: nowrap; - text-overflow: ellipsis; + text-overflow: ellipsis; */ } .o1_right .o1_sj_kill { @@ -287,4 +287,13 @@ swiper { align-items: center; } -.sp .sp_top .s_top_kill.gray{background-color:#bdbdc1;color: #fff;font-weight: normal} \ No newline at end of file +.sp .sp_top .s_top_kill.gray{background-color:#bdbdc1;color: #fff;font-weight: normal} + + +.ellipsis-2 { + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} \ No newline at end of file -- libgit2 0.21.4