32 lines
955 B
JavaScript
32 lines
955 B
JavaScript
"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);
|