| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- import { getCurrentInstance as u, ref as l, onMounted as m, openBlock as s, createElementBlock as a, createVNode as _, withCtx as y, renderSlot as f, toDisplayString as E } from "vue";
- import { r as g, s 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 = u(), { $l: i } = r.appContext.config.globalProperties, e = c, t = l(""), n = l("");
- return m(() => {
- 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("暂无数据", "components.empty") : typeof e.desc == "string" ? n.value = e.desc.trim() : n.value = i("暂无数据", "components.empty");
- }), (p, x) => {
- const d = o;
- return s(), a("div", S, [
- _(d, {
- image: t.value,
- imageStyle: c.iconStyle
- }, {
- description: y(() => [
- p.$slots.default ? (s(), a("span", v, [
- f(p.$slots, "default", {}, void 0, !0)
- ])) : (s(), a("span", I, E(n.value), 1))
- ]),
- _: 3
- }, 8, ["image", "imageStyle"])
- ]);
- };
- }
- }, M = /* @__PURE__ */ g(h, [["__scopeId", "data-v-a3108dac"]]);
- export {
- M as default
- };
|