2024-09-19 07:20:14 +08:00
|
|
|
"use strict";
|
2024-10-01 09:15:35 +08:00
|
|
|
const common_vendor = require("../../../../../common/vendor.js");
|
|
|
|
const modules_mall_sheep_index = require("../../index.js");
|
2024-09-19 07:20:14 +08:00
|
|
|
const _sfc_main = {
|
|
|
|
__name: "s-title-block",
|
|
|
|
props: {
|
|
|
|
// 装修数据
|
|
|
|
data: {
|
|
|
|
type: Object,
|
|
|
|
default: () => ({})
|
|
|
|
},
|
|
|
|
// 装修样式
|
|
|
|
styles: {
|
|
|
|
type: Object,
|
|
|
|
default: () => ({})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
setup(__props) {
|
|
|
|
const state = common_vendor.reactive({
|
|
|
|
typeMap: {
|
|
|
|
left: "ss-row-left",
|
|
|
|
center: "ss-row-center"
|
|
|
|
}
|
|
|
|
});
|
|
|
|
const props = __props;
|
|
|
|
const bgStyle = common_vendor.computed(() => {
|
|
|
|
const { bgType, bgImg, bgColor } = props.styles;
|
|
|
|
return {
|
|
|
|
background: bgType === "img" ? `url(${bgImg}) no-repeat top center / 100% 100%` : bgColor
|
|
|
|
};
|
|
|
|
});
|
|
|
|
const titleStyles = {
|
|
|
|
color: props.data.titleColor,
|
|
|
|
fontSize: `${props.data.titleSize}px`,
|
|
|
|
textAlign: props.data.textAlign
|
|
|
|
};
|
|
|
|
const descStyles = {
|
|
|
|
color: props.data.descriptionColor,
|
|
|
|
textAlign: props.data.textAlign,
|
|
|
|
fontSize: `${props.data.descriptionSize}px`,
|
|
|
|
fontWeight: `${props.data.descriptionWeight}px`
|
|
|
|
};
|
|
|
|
return (_ctx, _cache) => {
|
|
|
|
var _a, _b;
|
|
|
|
return common_vendor.e({
|
|
|
|
a: __props.data.title
|
|
|
|
}, __props.data.title ? {
|
|
|
|
b: common_vendor.t(__props.data.title),
|
|
|
|
c: common_vendor.s(titleStyles)
|
|
|
|
} : {}, {
|
|
|
|
d: __props.data.description
|
|
|
|
}, __props.data.description ? {
|
|
|
|
e: common_vendor.t(__props.data.description),
|
|
|
|
f: common_vendor.s(descStyles)
|
|
|
|
} : {}, {
|
|
|
|
g: (_a = __props.data.more) == null ? void 0 : _a.show
|
|
|
|
}, ((_b = __props.data.more) == null ? void 0 : _b.show) ? common_vendor.e({
|
|
|
|
h: __props.data.more.type !== "icon"
|
|
|
|
}, __props.data.more.type !== "icon" ? {
|
|
|
|
i: common_vendor.t(__props.data.more.text)
|
|
|
|
} : {}, {
|
|
|
|
j: __props.data.more.type !== "text"
|
|
|
|
}, __props.data.more.type !== "text" ? {} : {}, {
|
2024-10-01 09:15:35 +08:00
|
|
|
k: common_vendor.o(($event) => common_vendor.unref(modules_mall_sheep_index.sheep).$router.go(__props.data.more.url)),
|
2024-09-19 07:20:14 +08:00
|
|
|
l: __props.data.descriptionColor
|
|
|
|
}) : {}, {
|
|
|
|
m: common_vendor.n(state.typeMap[__props.data.textAlign]),
|
|
|
|
n: common_vendor.s(bgStyle.value),
|
|
|
|
o: common_vendor.s({
|
|
|
|
marginLeft: `${__props.data.space}px`
|
|
|
|
})
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
2024-10-01 09:15:35 +08:00
|
|
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-b90cd943"]]);
|
2024-09-19 07:20:14 +08:00
|
|
|
wx.createComponent(Component);
|