import { getCurrentInstance as d, ref as p, onMounted as _, openBlock as s, createElementBlock as a, createVNode as m, withCtx as f, renderSlot as y, toDisplayString as E } from "vue"; import { l as g, V as o } from "./index2.js"; const S = { class: "s-empty-common" }, v = { key: 0, class: "description" }, I = { key: 1, class: "description" }, h = { __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(c) { const r = d(), { $l: i } = r.appContext.config.globalProperties, e = c, t = p(""), n = p(""); return _(() => { e.icon ? t.value = e.icon : parseInt(e.type) === 1 ? t.value = o.PRESENTED_IMAGE_DEFAULT : parseInt(e.type) === 2 ? t.value = o.PRESENTED_IMAGE_SIMPLE : (t.value = o.PRESENTED_IMAGE_DEFAULT, console.warn( '内置type类型为:1 或者 2,如需其他类型,请使用icon属性,例如:icon="https://xxx.png' )), e.desc === void 0 ? n.value = i("暂无数据") : typeof e.desc == "string" ? n.value = e.desc.trim() : n.value = i("暂无数据"); }), (l, x) => { const u = o; return s(), a("div", S, [ m(u, { image: t.value, imageStyle: c.iconStyle }, { description: f(() => [ l.$slots.default ? (s(), a("span", v, [ y(l.$slots, "default", {}, void 0, !0) ])) : (s(), a("span", I, E(n.value), 1)) ]), _: 3 }, 8, ["image", "imageStyle"]) ]); }; } }, A = /* @__PURE__ */ g(h, [["__scopeId", "data-v-50c931b5"]]); export { A as default };