@extclp/vexip-ui
Version:
A Vue 3 UI library, Highly customizability, full TypeScript, performance pretty good
37 lines (36 loc) • 1.14 kB
JavaScript
import { defineComponent as u, inject as c, computed as s, unref as e, openBlock as t, createBlock as r, normalizeProps as p, mergeProps as d } from "vue";
import "../icon/index.mjs";
import "../renderer/index.mjs";
import { isFunction as f } from "@vexip-ui/utils";
import { TABLE_ACTIONS as b, TABLE_SLOTS as I } from "./symbol.mjs";
import S from "../renderer/renderer.mjs";
import a from "../icon/icon.mjs";
const j = /* @__PURE__ */ u({
name: "TableIcon",
__name: "table-icon",
props: {
name: {
type: String,
required: !0
},
origin: {
type: Object,
default: null
}
},
setup(n) {
const m = n, o = c(b), i = c(I), l = s(() => o.getIcon(m.name));
return (T, g) => e(f)(e(i)[`icon-${n.name}`]) ? (t(), r(e(S), {
key: 0,
renderer: e(o).renderTableSlot,
data: { name: `icon-${n.name}` }
}, null, 8, ["renderer", "data"])) : e(o).hasIcon(n.name) ? (t(), r(e(a), {
key: 1,
icon: l.value
}, null, 8, ["icon"])) : (t(), r(e(a), p(d({ key: 2 }, n.origin)), null, 16));
}
});
export {
j as default
};
//# sourceMappingURL=table-icon.vue2.mjs.map