import type { CustomizeComponent } from '../interface'; import Cell from '../Cell'; import { defineComponent } from 'vue'; import { useInjectTable } from '../context/TableContext'; export interface ExpandedRowProps { prefixCls: string; component: CustomizeComponent; cellComponent: CustomizeComponent; fixHeader: boolean; fixColumn: boolean; horizonScroll: boolean; componentWidth: number; expanded: boolean; colSpan: number; } export default defineComponent({ name: 'ExpandedRow', inheritAttrs: false, props: [ 'prefixCls', 'component', 'cellComponent', 'fixHeader', 'fixColumn', 'horizonScroll', 'componentWidth', 'expanded', 'colSpan', ] as any, setup(props, { slots, attrs }) { const tableContext = useInjectTable(); return () => { const { prefixCls, component: Component, cellComponent, fixHeader, fixColumn, expanded, componentWidth, colSpan, } = props; return ( { let contentNode: any = slots.default?.(); if (fixColumn) { contentNode = (
{contentNode}
); } return contentNode; }, }} >
); }; }, });