UNPKG

@fesjs/fes-design

Version:
31 lines (26 loc) 907 B
import { defineComponent, inject, openBlock, createElementBlock, normalizeClass, renderSlot } from 'vue'; import getPrefixCls from '../_util/getPrefixCls'; import { TABS_INJECTION_KEY } from './constants'; import { tabProps } from './props'; const prefixCls = getPrefixCls('tabs'); var script = defineComponent({ name: 'FTabPane', props: tabProps, setup() { const FTab = inject(TABS_INJECTION_KEY, null); if (!FTab) { return console.error('[FTabPane]: FTabPane 必须搭配 FTabs 组件使用!'); } return { prefixCls }; } }); function render(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("div", { class: normalizeClass(`${_ctx.prefixCls}-tab-pane`) }, [renderSlot(_ctx.$slots, "default")], 2 /* CLASS */); } script.render = render; script.__file = "components/tabs/tab-pane.vue"; export { script as default };