UNPKG

flamingo-ui

Version:

火烈鸟UI组件库

136 lines (135 loc) 4.66 kB
var __defProp = Object.defineProperty; var __defProps = Object.defineProperties; var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __hasOwnProp = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues = (a, b) => { for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) { if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); } return a; }; var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); import "./PayProblem-sfc.css"; import { reactive, toRefs, watch } from "vue"; import { debounce } from "../utils/index"; const __vue_sfc__ = { name: "PayProblem", props: { // 支付问题按钮 question: { type: Function, default: null }, // 已完成支付按钮 finish: { type: Function, default: null }, // 允许触碰遮罩层关闭 closeOnClickOverlay: { type: Boolean, default: false }, // 移除弹窗方法 remove: Function }, setup(props, ctx) { const data = reactive({ // 组件显示 show: true }); const fncallback = debounce((callback) => { callback ? callback(data) : data.show = false; }); watch(() => data.show, () => { if (data.show == false) { props.remove(); } }); const close = () => { props.closeOnClickOverlay ? data.show = false : ""; }; const confirm = () => { data.show = false; }; return __spreadProps(__spreadValues({}, toRefs(data)), { fncallback, close, confirm }); } }; import { createElementVNode as _createElementVNode, withModifiers as _withModifiers, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue"; const _hoisted_1 = /* @__PURE__ */ _createElementVNode( "p", { class: "fmg-payproblem-title" }, "\u63D0\u793A", -1 /* HOISTED */ ); const _hoisted_2 = /* @__PURE__ */ _createElementVNode( "div", { class: "fmg-payproblem-message" }, [ /* @__PURE__ */ _createElementVNode("ul", null, [ /* @__PURE__ */ _createElementVNode("li", null, "1\u3001\u5982\u652F\u4ED8\u9047\u5230\u95EE\u9898\uFF0C\u8BF7\u70B9\u51FB\u201C\u652F\u4ED8\u9047\u5230\u95EE\u9898\u201D\uFF0C\u8054\u7CFB\u5BA2\u670D\u8FDB\u884C\u53CD\u9988\u3002"), /* @__PURE__ */ _createElementVNode("li", null, "2\u3001\u5982\u5DF2\u5B8C\u6210\u652F\u4ED8\uFF0C\u8BF7\u70B9\u51FB\u201C\u5DF2\u5B8C\u6210\u652F\u4ED8\u201D\uFF0C\u53EF\u5728\u201C\u8D2D\u4E70\u8BB0\u5F55\u201D\u67E5\u770B\uFF0C\u6708\u5361\u5230\u8D26\u53EF\u80FD\u5EF6\u8FDF\u3002") ]) ], -1 /* HOISTED */ ); const _hoisted_3 = { class: "fmg-payproblem-donebtn" }; function __vue_render__(_ctx, _cache) { return _openBlock(), _createElementBlock( "div", { class: _normalizeClass(["fmg-payproblem", { "fmg-payproblem-hide": !_ctx.show }]), onClick: _cache[4] || (_cache[4] = (...args) => _ctx.close && _ctx.close(...args)), onTouchmove: _cache[5] || (_cache[5] = _withModifiers(() => { }, ["prevent"])) }, [ _createElementVNode("div", { class: "fmg-payproblem-wrapper", onClick: _cache[3] || (_cache[3] = _withModifiers(() => { }, ["stop"])) }, [ _hoisted_1, _createElementVNode("img", { onClick: _cache[0] || (_cache[0] = (...args) => _ctx.confirm && _ctx.confirm(...args)), class: "fmg-payproblem-icon", src: "https://gres.guopan.cn/png/20230313/payment-close.png", alt: "" }), _hoisted_2, _createElementVNode("div", _hoisted_3, [ _createElementVNode("a", { class: "hadProblem", onClick: _cache[1] || (_cache[1] = ($event) => _ctx.fncallback(_ctx.question)) }, "\u652F\u4ED8\u9047\u5230\u95EE\u9898"), _createElementVNode("a", { class: "haddone", onClick: _cache[2] || (_cache[2] = ($event) => _ctx.fncallback(_ctx.finish)) }, "\u5DF2\u5B8C\u6210\u652F\u4ED8") ]) ]) ], 34 /* CLASS, HYDRATE_EVENTS */ ); } __vue_sfc__.render = __vue_render__; __vue_sfc__._scopeId = "data-v-0a090e40"; var stdin_default = __vue_sfc__; export { stdin_default as default };