jiuyiUniapp/jiuyi2/unpackage/dist/dev/mp-weixin/components/public/jy-popup/index.js

90 lines
2.6 KiB
JavaScript

"use strict";
const common_vendor = require("../../../common/vendor.js");
const components_public_Mixins = require("../Mixins.js");
if (!Array) {
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
(_easycom_uni_icons2 + _easycom_uni_popup2)();
}
const _easycom_uni_icons = () => "../../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
const _easycom_uni_popup = () => "../../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
(_easycom_uni_icons + _easycom_uni_popup)();
}
const _sfc_main = {
__name: "index",
props: {
title: {
type: String,
default: ""
},
showSave: {
type: Boolean,
default: false
},
saveTitle: {
type: String,
default: "保存"
},
type: {
type: String,
default: "content"
}
},
emits: ["savePost"],
setup(__props, { expose: __expose, emit: __emit }) {
const jyPopup = common_vendor.ref(null);
const emit = __emit;
const close = () => {
jyPopup.value.close();
};
const open = () => {
jyPopup.value.open();
};
__expose({
close,
open
});
return (_ctx, _cache) => {
return common_vendor.e({
a: __props.type == "center"
}, __props.type == "center" ? common_vendor.e({
b: common_vendor.t(__props.title),
c: common_vendor.o$1(close),
d: common_vendor.p({
type: "closeempty",
size: "20"
}),
e: __props.showSave
}, __props.showSave ? {
f: common_vendor.o$1((...args) => _ctx.savePost && _ctx.savePost(...args))
} : {}) : {}, {
g: __props.type == "bottom"
}, __props.type == "bottom" ? common_vendor.e({
h: common_vendor.t(__props.title),
i: common_vendor.o$1(close),
j: common_vendor.p({
type: "closeempty",
size: "20"
}),
k: `${common_vendor.unref(components_public_Mixins.screenHeight)(true) * 0.7}px`,
l: __props.showSave
}, __props.showSave ? {
m: common_vendor.t(__props.saveTitle),
n: common_vendor.o$1(($event) => emit("savePost"))
} : {}, {
o: `${common_vendor.unref(components_public_Mixins.bottomSafeAreaHeight)(true) + 20}px`
}) : {}, {
p: common_vendor.sr(jyPopup, "a763e803-0", {
"k": "jyPopup"
}),
q: common_vendor.p({
type: __props.type
})
});
};
}
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-a763e803"]]);
wx.createComponent(Component);