mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-11-08 01:48:55 +08:00
- 将所有模板组件的 pageGap/marginBottom 默认值从 10rpx 调整为 0 - 重构店铺卡片样式一为全景大片橱窗布局,添加自营标签与图片加载容错 - 重构店铺卡片样式二为大牌名店街 + 精品橱窗风格,优化商品封面与价格展示 - 促销详情模板添加 isRealGoods 过滤,无有效数据时整块不渲染 - 修复 u-notice-bar 横向滚动模式下 text 需为字符串的类型兼容问题 - 统一将模板中 HTML 实体 > 改为插值表达式避免转义异常
31 lines
816 B
Vue
31 lines
816 B
Vue
<template>
|
|
<view class="tpl-line" :style="wrapperStyle">
|
|
<view :style="lineStyle"></view>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { computed } from "vue";
|
|
|
|
const props = defineProps<{ res: any }>();
|
|
|
|
const wrapperStyle = computed(() => {
|
|
const res = props.res || {};
|
|
const bg =
|
|
res.bgColor1 !== undefined
|
|
? !res.bgColor2 || res.bgColor1 === res.bgColor2
|
|
? res.bgColor1
|
|
: `linear-gradient(180deg, ${res.bgColor1}, ${res.bgColor2})`
|
|
: res.bgColor || "#FFFFFF";
|
|
return {
|
|
background: bg,
|
|
padding: `0 ${res.paddingX ?? 0}rpx`,
|
|
marginBottom: `${res.pageGap ?? 0}rpx`,
|
|
};
|
|
});
|
|
|
|
const lineStyle = computed(() => ({
|
|
borderTop: `${props.res?.lineHeight ?? 1}rpx ${props.res?.lineStyle || "dashed"} ${props.res?.lineColor || "#979797"}`,
|
|
}));
|
|
</script>
|