UNPKG

@wetspace/pro-components

Version:
55 lines (54 loc) 1.65 kB
import { defineComponent as _, openBlock as r, createElementBlock as s, normalizeClass as i, unref as o, normalizeStyle as g, createElementVNode as n, Fragment as y, renderList as k, toDisplayString as c, createVNode as b, withCtx as x, createTextVNode as C } from "vue"; import { useNamespace as E, ElButton as N } from "element-plus"; import { wetErrorPageProps as v } from "../types.mjs"; const w = { class: "center__desc" }, P = /* @__PURE__ */ _({ __name: "index", props: v, emits: ["backhome"], setup(p, { emit: m }) { const l = E("errorpage"), t = p, d = m, a = { 403: { title: "403", desc: "对不起,您没有权限访问此页面" }, 404: { title: "404", desc: "对不起,资源不存在" }, 500: { title: "500", desc: "服务器错误,请稍后再试" } }; return (B, e) => (r(), s("div", { class: i([o(l).b()]), style: g({ "--wet-error-page-bg": `url(${t.backgroundImage || ""})` }) }, [ n("div", { class: i([o(l).e("center")]) }, [ n("h1", null, [ (r(!0), s(y, null, k(a[t.type].title.split(""), (u, f) => (r(), s("span", { key: f, class: "center__desc-span" }, c(u), 1))), 128)) ]), n("div", w, c(a[t.type].desc), 1), b(o(N), { type: "primary", onClick: e[0] || (e[0] = () => d("backhome")) }, { default: x(() => e[1] || (e[1] = [ C(" 返回首页 ") ])), _: 1 }) ], 2) ], 6)); } }); export { P as default };