Authored by 陈峰

套餐字符长度控制

... ... @@ -227,7 +227,7 @@ const tool = {
let subPrice = _.get(bundleData, 'bundleInfo.subPrice', 0);
return {
title: '优惠套装',
title: _.get(bundleData, 'bundleInfo.bundleName') || '优惠套装',
href: helpers.urlFormat('/product/bundle/detail', {skn: skn, gid: gid, index: index}),
description: subPrice ? '立省¥' + subPrice : 0,
productList: productProcess.processProductList(bundleData && bundleData.productList)
... ...
... ... @@ -4,8 +4,10 @@
<div class="swiper-wrapper">
{{# bundleDatas}}
<div class="swiper-slide{{#if @first}} selected{{/if}}" data-index="{{@index}}">
<span>{{title}}</span>
<div class="line"></div>
<div class="title">
<span>{{title}}</span>
</div>
</div>
{{/ bundleDatas}}
</div>
... ...
... ... @@ -25,6 +25,7 @@
width: 168px;
text-align: center;
position: relative;
display: flex;
&:first-child {
.line {
... ... @@ -47,13 +48,22 @@
border-left: solid 1PX #ddd;
}
span {
display: inline-block;
min-width: 103px;
line-height: 76px;
height: 76px;
color: #b2b2b2;
font-size: 28px;
.title {
width: 100%;
flex: 1;
span {
display: inline-block;
min-width: 103px;
max-width: 100%;
color: #b2b2b2;
line-height: 76px;
height: 76px;
font-size: 28px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}
}
}
... ...