Files
threeonecheck_web/unpackage/dist/dev/mp-weixin/components/hazard/HazardFormPopup.js
2026-06-30 09:47:10 +08:00

116 lines
3.5 KiB
JavaScript

"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Array) {
const _easycom_u_popup2 = common_vendor.resolveComponent("u-popup");
_easycom_u_popup2();
}
const _easycom_u_popup = () => "../../uni_modules/uview-plus/components/u-popup/u-popup.js";
if (!Math) {
(HazardFormPanel + _easycom_u_popup)();
}
const HazardFormPanel = () => "./HazardFormPanel.js";
const _sfc_main = {
__name: "HazardFormPopup",
props: {
show: {
type: Boolean,
default: false
},
title: {
type: String,
default: "填写隐患信息"
},
mode: {
type: String,
default: "collect"
},
modelValue: {
type: Object,
default: null
},
extraParams: {
type: Object,
default: () => ({})
},
showDraftBanner: {
type: Boolean,
default: false
},
bodyHeight: {
type: String,
default: ""
},
canvasId: {
type: String,
default: "hazardFormWatermarkCanvas"
}
},
emits: ["update:show", "update:modelValue", "success", "confirm", "clear-draft"],
setup(__props, { expose: __expose, emit: __emit }) {
const props = __props;
const emit = __emit;
const popupVisible = common_vendor.computed({
get: () => props.show,
set: (value) => emit("update:show", value)
});
const panelProps = common_vendor.computed(() => ({
title: props.title,
mode: props.mode,
modelValue: props.modelValue,
extraParams: props.extraParams,
showDraftBanner: props.showDraftBanner,
bodyHeight: props.bodyHeight,
canvasId: props.canvasId
}));
const handlePopupClose = () => {
popupVisible.value = false;
};
const panelRef = common_vendor.ref(null);
__expose({
getPayload: (...args) => {
var _a, _b;
return (_b = (_a = panelRef.value) == null ? void 0 : _a.getPayload) == null ? void 0 : _b.call(_a, ...args);
},
applyPayload: (...args) => {
var _a, _b;
return (_b = (_a = panelRef.value) == null ? void 0 : _a.applyPayload) == null ? void 0 : _b.call(_a, ...args);
},
resetForm: (...args) => {
var _a, _b;
return (_b = (_a = panelRef.value) == null ? void 0 : _a.resetForm) == null ? void 0 : _b.call(_a, ...args);
},
validateForm: (...args) => {
var _a, _b;
return (_b = (_a = panelRef.value) == null ? void 0 : _a.validateForm) == null ? void 0 : _b.call(_a, ...args);
}
});
return (_ctx, _cache) => {
return {
a: common_vendor.sr(panelRef, "52d033ec-1,52d033ec-0", {
"k": "panelRef"
}),
b: common_vendor.o(($event) => popupVisible.value = $event),
c: common_vendor.o((payload) => emit("success", payload)),
d: common_vendor.o((payload) => emit("confirm", payload)),
e: common_vendor.o(($event) => emit("clear-draft")),
f: common_vendor.o(($event) => popupVisible.value = false),
g: common_vendor.p({
...panelProps.value,
show: popupVisible.value
}),
h: common_vendor.o(handlePopupClose),
i: common_vendor.o(($event) => popupVisible.value = $event),
j: common_vendor.p({
mode: "center",
round: "20",
["safe-area-inset-bottom"]: false,
show: popupVisible.value
}),
k: common_vendor.gei(_ctx, "")
};
};
}
};
wx.createComponent(_sfc_main);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/hazard/HazardFormPopup.js.map