feat(uniapp): 首页楼层模板支持装修样式字段,修复 tpl_notice 样式缺少闭合括号

This commit is contained in:
pikachu1995@126.com
2026-10-20 14:17:21 +08:00
parent a41936dc00
commit 986625c516
26 changed files with 3915 additions and 774 deletions

View File

@@ -7,9 +7,18 @@ import { computed } from "vue";
const props = defineProps<{ res: any }>();
const blankStyle = computed(() => ({
background: props.res?.bgColor || "#f5f5f5",
height: `${props.res?.height ?? 10}rpx`,
margin: `0 ${props.res?.paddingX ?? 0}rpx ${props.res?.pageGap ?? 10}rpx`,
}));
const blankStyle = 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 || "#f5f5f5";
return {
background: bg,
height: `${res.height ?? 10}rpx`,
margin: `0 ${res.paddingX ?? 0}rpx ${res.pageGap ?? 10}rpx`,
};
});
</script>