58 lines
2.0 KiB
JavaScript
Raw Normal View History

2025-07-08 16:49:39 +08:00
"use strict";
const common_vendor = require("../../common/vendor.js");
2025-12-15 18:27:46 +08:00
if (!Array) {
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
_easycom_uni_icons2();
}
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
if (!Math) {
_easycom_uni_icons();
}
2025-07-08 16:49:39 +08:00
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "hs-button",
2025-12-15 18:27:46 +08:00
props: [
"type",
"label",
"icon",
"size",
"openType",
"disabled",
"iconColor",
"buttonStyle"
],
2025-07-08 16:49:39 +08:00
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) => {
2025-12-15 18:27:46 +08:00
return common_vendor.e({
a: props == null ? void 0 : props.icon
}, (props == null ? void 0 : props.icon) ? {
b: common_vendor.p({
type: props == null ? void 0 : props.icon,
size: "16",
color: (props == null ? void 0 : props.iconColor) || "#0082fa"
})
} : {}, {
c: common_vendor.t((props == null ? void 0 : props.label) || "我是按钮"),
d: common_vendor.s(props.buttonStyle),
e: (props == null ? void 0 : props.openType) || "",
f: common_vendor.n(`nchl_button ${props == null ? void 0 : props.type}_button ${(props == null ? void 0 : props.size) || "sm"}_size`),
g: common_vendor.o(handleClick),
h: common_vendor.o(handleGetPhoneNumber),
i: props == null ? void 0 : props.disabled
});
2025-07-08 16:49:39 +08:00
};
}
});
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);