acdr-ui/dist/dev/mp-weixin/components/RecommendedServiceCard.js

33 lines
1006 B
JavaScript
Raw Normal View History

2024-09-19 07:20:14 +08:00
"use strict";
const common_vendor = require("../common/vendor.js");
const minHeight = 300;
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "RecommendedServiceCard",
props: {
image: String,
title: String,
description: String,
price: String
},
setup(__props) {
const height = common_vendor.ref(minHeight);
const updateHeight = (event) => {
const { width, height: imgHeight } = event.detail;
height.value = imgHeight / width * minHeight;
};
return (_ctx, _cache) => {
return {
a: __props.image,
b: common_vendor.o(updateHeight),
c: common_vendor.t(__props.title),
d: common_vendor.t(__props.description),
e: common_vendor.t(__props.price),
f: height.value + "px"
};
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-b66a6680"]]);
wx.createComponent(Component);
//# sourceMappingURL=RecommendedServiceCard.js.map