import { getCurrentInstance as d, ref as l, onMounted as _, openBlock as o, createElementBlock as s, createVNode as m, withCtx as f, renderSlot as y, toDisplayString as E } from "vue"; import { Empty as a } from "ant-design-vue"; import { n as g, ai as S } from "./index2.js"; const v = { class: "s-empty-common" }, I = { key: 0, class: "description" }, h = { key: 1, class: "description" }, x = { __name: "SEmpty", props: { /** * icon类型 * @type */ type: { type: [String, Number], default: 1 }, /** * 提示信息 * @icon */ icon: { type: [String, Object], default: "" }, /** * 描述信息 * @desc */ desc: { type: [String, Boolean], default() { } }, /** * 图片样式 * @desc */ iconStyle: { type: Object, default() { return {}; } } }, setup(i) { const r = d(), { $l: c } = r.appContext.config.globalProperties, e = i, t = l(""), n = l(""); return _(() => { e.icon ? t.value = e.icon : parseInt(e.type) === 1 ? t.value = a.PRESENTED_IMAGE_DEFAULT : parseInt(e.type) === 2 ? t.value = a.PRESENTED_IMAGE_SIMPLE : (t.value = a.PRESENTED_IMAGE_DEFAULT, console.warn( '内置type类型为:1 或者 2,如需其他类型,请使用icon属性,例如:icon="https://xxx.png' )), e.desc === void 0 ? n.value = c("暂无数据") : typeof e.desc == "string" ? n.value = e.desc.trim() : n.value = c("暂无数据"); }), (p, D) => { const u = S; return o(), s("div", v, [ m(u, { image: t.value, imageStyle: i.iconStyle }, { description: f(() => [ p.$slots.default ? (o(), s("span", I, [ y(p.$slots, "default", {}, void 0, !0) ])) : (o(), s("span", h, E(n.value), 1)) ]), _: 3 }, 8, ["image", "imageStyle"]) ]); }; } }, N = /* @__PURE__ */ g(x, [["__scopeId", "data-v-94e980b8"]]); export { N as default };