PurchaseModal.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. "use strict";
  2. const common_vendor = require("../common/vendor.js");
  3. const _sfc_main = {
  4. __name: "PurchaseModal",
  5. props: {
  6. visible: { type: Boolean, default: false },
  7. icon: { type: String, default: "💰" },
  8. title: { type: String, default: "打赏解锁" },
  9. description: { type: String, default: "" },
  10. amountLabel: { type: String, default: "打赏金额:" },
  11. amount: { type: [Number, String], default: 1 }
  12. },
  13. emits: ["close", "confirm"],
  14. setup(__props, { emit }) {
  15. const onClose = () => emit("close");
  16. const onConfirm = () => emit("confirm");
  17. return (_ctx, _cache) => {
  18. return common_vendor.e({
  19. a: __props.visible
  20. }, __props.visible ? {
  21. b: common_vendor.o(onClose),
  22. c: common_vendor.t(__props.icon),
  23. d: common_vendor.t(__props.title),
  24. e: common_vendor.t(__props.description),
  25. f: common_vendor.t(__props.amountLabel),
  26. g: common_vendor.t(__props.amount),
  27. h: common_vendor.o(onConfirm),
  28. i: common_vendor.o(() => {
  29. }),
  30. j: common_vendor.o(onClose)
  31. } : {});
  32. };
  33. }
  34. };
  35. const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1af578f4"], ["__file", "D:/program/gupiao/gupiao-wx/src/components/PurchaseModal.vue"]]);
  36. wx.createComponent(Component);