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
|
|
|
if (!Array) {
|
|
|
|
const _easycom_uni_grid_item2 = common_vendor.resolveComponent("uni-grid-item");
|
|
|
|
const _easycom_uni_grid2 = common_vendor.resolveComponent("uni-grid");
|
|
|
|
(_easycom_uni_grid_item2 + _easycom_uni_grid2)();
|
|
|
|
}
|
2024-10-01 09:15:35 +08:00
|
|
|
const _easycom_uni_grid_item = () => "../../../../../uni_modules/uni-grid/components/uni-grid-item/uni-grid-item.js";
|
|
|
|
const _easycom_uni_grid = () => "../../../../../uni_modules/uni-grid/components/uni-grid/uni-grid.js";
|
2024-09-19 07:20:14 +08:00
|
|
|
if (!Math) {
|
|
|
|
(_easycom_uni_grid_item + _easycom_uni_grid)();
|
|
|
|
}
|
|
|
|
const _sfc_main = {
|
|
|
|
__name: "s-menu-grid",
|
|
|
|
props: {
|
|
|
|
// 装修数据
|
|
|
|
data: {
|
|
|
|
type: Object,
|
|
|
|
default: () => ({})
|
|
|
|
},
|
|
|
|
// 装修样式
|
|
|
|
styles: {
|
|
|
|
type: Object,
|
|
|
|
default: () => ({})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
setup(__props) {
|
|
|
|
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
|
|
|
|
};
|
|
|
|
});
|
|
|
|
return (_ctx, _cache) => {
|
|
|
|
return {
|
|
|
|
a: common_vendor.f(__props.data.list, (item, index, i0) => {
|
|
|
|
return common_vendor.e({
|
|
|
|
a: item.badge.show
|
|
|
|
}, item.badge.show ? {
|
|
|
|
b: common_vendor.t(item.badge.text),
|
|
|
|
c: common_vendor.s({
|
|
|
|
background: item.badge.bgColor,
|
|
|
|
color: item.badge.textColor
|
|
|
|
})
|
|
|
|
} : {}, {
|
2024-10-01 09:15:35 +08:00
|
|
|
d: common_vendor.unref(modules_mall_sheep_index.sheep).$url.cdn(item.iconUrl),
|
2024-09-19 07:20:14 +08:00
|
|
|
e: common_vendor.t(item.title),
|
|
|
|
f: common_vendor.s({
|
|
|
|
color: item.titleColor
|
|
|
|
}),
|
|
|
|
g: common_vendor.t(item.subtitle),
|
|
|
|
h: common_vendor.s({
|
|
|
|
color: item.subtitleColor
|
|
|
|
}),
|
|
|
|
i: index,
|
2024-10-01 09:15:35 +08:00
|
|
|
j: common_vendor.o(($event) => common_vendor.unref(modules_mall_sheep_index.sheep).$router.go(item.url), index),
|
|
|
|
k: "37a9f0a2-1-" + i0 + ",37a9f0a2-0"
|
2024-09-19 07:20:14 +08:00
|
|
|
});
|
|
|
|
}),
|
|
|
|
b: common_vendor.p({
|
|
|
|
showBorder: Boolean(__props.data.border),
|
|
|
|
column: __props.data.column
|
|
|
|
}),
|
|
|
|
c: common_vendor.s(bgStyle.value),
|
|
|
|
d: 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-37a9f0a2"]]);
|
2024-09-19 07:20:14 +08:00
|
|
|
wx.createComponent(Component);
|