yuang-framework-ui-pc
Version:
yuang-framework-ui-pc Library
60 lines (59 loc) • 2.2 kB
JavaScript
"use strict";
const vue = require("vue");
const elementPlus = require("element-plus");
const props = require("./props");
const _sfc_main = vue.defineComponent({
name: "EleText",
components: { ElIcon: elementPlus.ElIcon },
props: props.textProps
});
const _export_sfc = (sfc, props2) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props2) {
target[key] = val;
}
return target;
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_ElIcon = vue.resolveComponent("ElIcon");
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tag), {
class: vue.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: vue.withCtx(() => [
_ctx.icon ? (vue.openBlock(), vue.createBlock(_component_ElIcon, vue.normalizeProps(vue.mergeProps({ key: 0 }, _ctx.iconProps || {})), {
default: vue.withCtx(() => [
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon), {
style: vue.normalizeStyle(_ctx.iconStyle)
}, null, 8, ["style"]))
]),
_: 1
}, 16)) : vue.createCommentVNode("", true),
vue.renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 8, ["class"]);
}
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
module.exports = index;