mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-11-13 20:38:51 +08:00
style(home): 优化首页模板组件间距与店铺卡片视觉样式
- 将所有模板组件的 pageGap/marginBottom 默认值从 10rpx 调整为 0 - 重构店铺卡片样式一为全景大片橱窗布局,添加自营标签与图片加载容错 - 重构店铺卡片样式二为大牌名店街 + 精品橱窗风格,优化商品封面与价格展示 - 促销详情模板添加 isRealGoods 过滤,无有效数据时整块不渲染 - 修复 u-notice-bar 横向滚动模式下 text 需为字符串的类型兼容问题 - 统一将模板中 HTML 实体 > 改为插值表达式避免转义异常
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
:direction="directionValue"
|
||||
:bg-color="styled ? 'transparent' : item.bk_color"
|
||||
:color="item.color"
|
||||
:text="texts"
|
||||
:text="noticeText"
|
||||
@click="clickNotice"
|
||||
></u-notice-bar>
|
||||
</view>
|
||||
@@ -67,8 +67,19 @@ const texts = computed(() =>
|
||||
titleList.value.map((t: any) => String(t.context))
|
||||
);
|
||||
|
||||
function clickNotice(index: number) {
|
||||
const target = titleList.value[index];
|
||||
// uView-plus 的 notice-bar 在横向滚动(direction="row")时要求 text 为字符串,竖向(column)可为数组
|
||||
const noticeText = computed(() => {
|
||||
if (directionValue.value === "row") {
|
||||
return texts.value.join(" ");
|
||||
}
|
||||
return texts.value;
|
||||
});
|
||||
|
||||
function clickNotice(index?: number) {
|
||||
const target =
|
||||
typeof index === "number"
|
||||
? titleList.value[index] || titleList.value[0]
|
||||
: titleList.value[0];
|
||||
if (target && target.url) {
|
||||
modelNavigateTo(target);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user