UNPKG

yuang-framework-ui-pc

Version:

yuang-framework-ui-pc Library

61 lines (60 loc) 2.27 kB
import { defineComponent, resolveComponent, openBlock, createBlock, resolveDynamicComponent, normalizeClass, withCtx, normalizeProps, mergeProps, normalizeStyle, createCommentVNode, renderSlot } from "vue"; import { ElIcon } from "element-plus"; import { textProps } from "./props"; const _sfc_main = defineComponent({ name: "EleText", components: { ElIcon }, props: textProps }); const _export_sfc = (sfc, props) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props) { target[key] = val; } return target; }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_ElIcon = resolveComponent("ElIcon"); return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), { class: normalizeClass([ "ele-text", { "is-heading": _ctx.type === "heading" }, { "is-secondary": _ctx.type === "secondary" }, { "is-placeholder": _ctx.type === "placeholder" }, { "is-primary": _ctx.type === "primary" }, { "is-success": _ctx.type === "success" }, { "is-warning": _ctx.type === "warning" }, { "is-danger": _ctx.type === "danger" }, { "is-info": _ctx.type === "info" }, { "is-xs": _ctx.size === "xs" }, { "is-sm": _ctx.size === "sm" }, { "is-md": _ctx.size === "md" }, { "is-lg": _ctx.size === "lg" }, { "is-xl": _ctx.size === "xl" }, { "is-xxl": _ctx.size === "xxl" }, { "is-xxxl": _ctx.size === "xxxl" }, { "is-delete": _ctx.deleted }, { "is-underline": _ctx.underline }, { "is-strong": _ctx.strong }, { "is-italic": _ctx.italic }, { "is-icon": !!_ctx.icon } ]) }, { default: withCtx(() => [ _ctx.icon ? (openBlock(), createBlock(_component_ElIcon, normalizeProps(mergeProps({ key: 0 }, _ctx.iconProps || {})), { default: withCtx(() => [ (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { style: normalizeStyle(_ctx.iconStyle) }, null, 8, ["style"])) ]), _: 1 }, 16)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default") ]), _: 3 }, 8, ["class"]); } const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); export { index as default };