UNPKG

tav-ui

Version:
47 lines (44 loc) 1.9 kB
import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, createCommentVNode, renderSlot } from 'vue'; import { TaBasicHelp } from '../../basic-help/index2.mjs'; import { TaIcon } from '../../icon/index2.mjs'; import { basicTitleProps } from './types2.mjs'; import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.mjs'; const _sfc_main = defineComponent({ name: "TaBasicTitle", components: { Icon: TaIcon, BasicHelp: TaBasicHelp }, props: basicTitleProps, setup(props, { slots }) { const prefixCls = "ta-basic-title"; const getClass = computed(() => [ prefixCls, { [`${prefixCls}-show-span`]: props.span && slots.default }, { [`${prefixCls}-normal`]: props.normal } ]); return { prefixCls, getClass }; } }); function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_Icon = resolveComponent("Icon"); const _component_BasicHelp = resolveComponent("BasicHelp"); return openBlock(), createElementBlock("span", { class: normalizeClass(_ctx.getClass) }, [ _ctx.$props.icon ? (openBlock(), createBlock(_component_Icon, { key: 0, icon: _ctx.$props.icon, color: _ctx.$props.iconColor }, null, 8, ["icon", "color"])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default"), _ctx.helpMessage ? (openBlock(), createBlock(_component_BasicHelp, { key: 1, class: normalizeClass(`${_ctx.prefixCls}-help`), text: _ctx.helpMessage }, null, 8, ["class", "text"])) : createCommentVNode("v-if", true) ], 2); } var BasicTitle = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/tav-ui/tav-ui/packages/components/basic-title/src/basic-title.vue"]]); export { BasicTitle as default }; //# sourceMappingURL=basic-title2.mjs.map