import { createNamespace } from '../utils'; import { inherit } from '../utils/functional'; // Types import { CreateElement, RenderContext } from 'vue/types'; import { DefaultSlots } from '../utils/types'; export type CellGroupProps = { title?: string; border: boolean }; const [createComponent, bem] = createNamespace('cell-group'); function CellGroup( h: CreateElement, props: CellGroupProps, slots: DefaultSlots, ctx: RenderContext ) { const Group = (
{slots.default && slots.default()}
); if (props.title) { return (
{props.title}
{Group}
); } return Group; } CellGroup.props = { title: String, border: { type: Boolean, default: true } }; export default createComponent(CellGroup);