UNPKG

@ctsy/layui-vue

Version:

a component library for Vue 3 base on layui-vue

83 lines (82 loc) 3.33 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 { defineComponent, useSlots, openBlock, createElementBlock, createElementVNode, unref, renderSlot, Fragment, createCommentVNode, toDisplayString } from "vue"; var index = ""; const _hoisted_1 = { class: "layui-exception" }; const _hoisted_2 = { class: "layui-exception-image" }; const _hoisted_3 = { key: 0, class: "error-401" }; const _hoisted_4 = { key: 1, class: "error-403" }; const _hoisted_5 = { key: 2, class: "error-404" }; const _hoisted_6 = { key: 3, class: "error-500" }; const _hoisted_7 = { class: "layui-exception-details" }; const _hoisted_8 = { class: "layui-exception-details-content" }; const _hoisted_9 = { class: "layui-exception-details-title" }; const _hoisted_10 = { class: "layui-exception-details-describe" }; const _hoisted_11 = { class: "layui-exception-details-extra" }; const __default__ = { name: "LayException" }; const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__), { props: { title: { default: "Exception" }, status: null, describe: { default: "describe" } }, setup(__props) { const slots = useSlots(); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", _hoisted_1, [ createElementVNode("div", _hoisted_2, [ unref(slots).default ? renderSlot(_ctx.$slots, "image", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [ __props.status == "401" ? (openBlock(), createElementBlock("div", _hoisted_3)) : createCommentVNode("", true), __props.status == "403" ? (openBlock(), createElementBlock("div", _hoisted_4)) : createCommentVNode("", true), __props.status == "404" ? (openBlock(), createElementBlock("div", _hoisted_5)) : createCommentVNode("", true), __props.status == "500" ? (openBlock(), createElementBlock("div", _hoisted_6)) : createCommentVNode("", true) ], 64)) ]), createElementVNode("div", _hoisted_7, [ createElementVNode("div", _hoisted_8, [ createElementVNode("div", _hoisted_9, toDisplayString(__props.title), 1), createElementVNode("div", _hoisted_10, toDisplayString(__props.describe), 1), createElementVNode("div", _hoisted_11, [ renderSlot(_ctx.$slots, "extra") ]) ]) ]) ]); }; } })); _sfc_main.install = (app) => { app.component(_sfc_main.name, _sfc_main); }; export { _sfc_main as default };