32 lines
1.3 KiB
JavaScript
32 lines
1.3 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
__name: "hs-button",
|
|
props: ["type", "label", "size", "openType", "buttonStyle"],
|
|
emits: ["click", "onGetPhoneNumber"],
|
|
setup(__props, { emit }) {
|
|
const props = __props;
|
|
const handleClick = () => {
|
|
emit("click");
|
|
};
|
|
const handleGetPhoneNumber = (e) => {
|
|
var _a;
|
|
if (((_a = e == null ? void 0 : e.detail) == null ? void 0 : _a.errMsg) === "getPhoneNumber:ok") {
|
|
emit("onGetPhoneNumber", e);
|
|
}
|
|
};
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: common_vendor.t((props == null ? void 0 : props.label) || "我是按钮"),
|
|
b: common_vendor.s(props.buttonStyle),
|
|
c: (props == null ? void 0 : props.openType) || "",
|
|
d: common_vendor.n(`nchl_button ${props == null ? void 0 : props.type}_button ${(props == null ? void 0 : props.size) || "sm"}_size`),
|
|
e: common_vendor.o(handleClick),
|
|
f: common_vendor.o(handleGetPhoneNumber)
|
|
};
|
|
};
|
|
}
|
|
});
|
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-abb95bf8"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/components/hs-button/hs-button.vue"]]);
|
|
wx.createComponent(Component);
|