UNPKG

egova-admin-web

Version:

新版统一用户中心前端项目

125 lines (124 loc) 3.02 kB
import { watch as u, onMounted as g, onActivated as h, defineComponent as m, ref as a, resolveComponent as x, openBlock as l, createElementBlock as f, createBlock as _, withCtx as S, createElementVNode as T, mergeProps as $, createVNode as k } from "vue"; import { u as E, O as p, Z as b, _ as d, l as Z } from "./index-017479e1.mjs"; import { useRoute as v } from "vue-router"; import { Spin as B } from "ant-design-vue/es"; import { Spin as I } from "ant-design-vue"; import "axios"; import "lodash-es"; import "sm-crypto"; import "crypto-js"; import "pinia"; import "qs"; import "@vueuse/core"; import "validator"; import "@ant-design/icons-vue"; import "dayjs"; import "qrcode"; /*! egova-admin-web v2.4.12-r210.4 */ function N(r) { const { title: e } = r, s = v(), n = E(); function t() { p.isEmptyText(e.value) || n.updateTitle(s.fullPath, e.value); } u( () => e.value, () => { t(); }, { immediate: !0 } ), g(() => { t(); }), h(() => { t(); }); } const q = m({ name: "ZtIframe", components: { ASpin: I, ZtEmpty: b }, inheritAttrs: !1, props: { src: { type: String, default: "" } }, setup(r) { const e = a(!0), s = a(!1), n = a(); return u( () => r.src, (t) => { t ? (s.value = !0, /.*?script[^>]*?.*?(<\/.*?script.*?>)*/gi.test(t) ? n.value = t.replace("script", "</*script*/>") : n.value = t, e.value = !0, setTimeout(() => { e.value = !1; }, 500)) : s.value = !1; }, { immediate: !0 } ), { loading: e, validate: s, href: n }; } }); const w = { class: "zt-iframe" }, A = ["src"]; function C(r, e, s, n, t, c) { const i = B, o = x("ZtEmpty"); return l(), f("div", w, [ r.validate ? (l(), _(i, { key: 0, "wrapper-class-name": "zt-spin-full", spinning: r.loading }, { default: S(() => [ T("iframe", $({ frameBorder: "0", src: r.href }, r.$attrs), null, 16, A) ]), _: 1 }, 8, ["spinning"])) : (l(), _(o, { key: 1, center: "" })) ]); } const O = /* @__PURE__ */ d(q, [["render", C]]), P = { class: "v-iframe" }, V = m({ name: "VIframe" }), z = /* @__PURE__ */ m({ ...V, setup(r) { const e = v(), s = a(), n = a(); N({ title: s }); async function t() { const { title: c, src: i } = e.query; if (p.isEmptyText(c) ? s.value = "" : s.value = String(c), p.isEmptyText(i)) n.value = ""; else { let o = String(i); if (o.indexOf("${token}") !== -1) { const y = Z.getToken(); o = o.replace("${token}", y); } n.value = o; } } return u( () => e.fullPath, () => { t(); }, { immediate: !0 } ), (c, i) => (l(), f("div", P, [ k(O, { src: n.value }, null, 8, ["src"]) ])); } }); const se = /* @__PURE__ */ d(z, [["__scopeId", "data-v-e0c4b05a"]]); export { se as default };