| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- 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, ah 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(c) {
- const r = d(), { $l: i } = r.appContext.config.globalProperties, e = c, 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 = i("暂无数据") : typeof e.desc == "string" ? n.value = e.desc.trim() : n.value = i("暂无数据");
- }), (p, D) => {
- const u = S;
- return o(), s("div", v, [
- m(u, {
- image: t.value,
- imageStyle: c.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-50c931b5"]]);
- export {
- N as default
- };
|