@fesjs/fes-design
Version:
fes-design for PC
245 lines (244 loc) • 8.54 kB
TypeScript
import { type PropType, type VNode, type useSlots } from 'vue';
import type { EllipsisProps } from '../ellipsis';
import type { ExtractPublicPropTypes } from '../_util/interface';
import type { InnerCellProps } from './components/cell';
import type { ActionType, RowType } from './interface';
export type SortOrderType = 'descend' | 'ascend' | false;
export type SorterType = ((a: RowType, b: RowType) => boolean) | 'default';
export declare const columnProps: {
readonly label: StringConstructor;
readonly prop: StringConstructor;
readonly type: {
readonly type: PropType<"default" | "expand" | "selection">;
readonly default: "default";
};
readonly multiple: {
readonly type: BooleanConstructor;
readonly default: true;
};
readonly align: {
readonly type: PropType<"center" | "left" | "right">;
readonly default: "left";
};
readonly width: NumberConstructor;
readonly minWidth: NumberConstructor;
readonly colClassName: PropType<string | object | [] | (({ row, column, rowIndex, columnIndex, cellValue, }: {
row: RowType;
column: ColumnInst;
rowIndex: number;
columnIndex: number;
cellValue: any;
}) => string | [] | object)>;
readonly colStyle: PropType<object | (({ row, column, rowIndex, columnIndex, cellValue, }: {
row: RowType;
column: ColumnInst;
rowIndex: number;
columnIndex: number;
cellValue: any;
}) => object)>;
readonly fixed: {
readonly type: PropType<boolean | "left" | "right">;
};
readonly formatter: PropType<(data: InnerCellProps) => any>;
readonly resizable: {
readonly type: BooleanConstructor;
readonly default: false;
};
readonly sortable: {
readonly type: BooleanConstructor;
readonly default: false;
};
readonly sortDirections: {
readonly type: PropType<("descend" | "ascend")[]>;
readonly default: readonly ["descend", "ascend"];
};
readonly sortOrder: {
readonly type: PropType<SortOrderType>;
readonly default: false;
};
readonly sorter: {
readonly type: PropType<SorterType>;
readonly default: "default";
};
readonly selectable: PropType<({ row, rowIndex }: {
row: RowType;
rowIndex: number;
}) => void>;
readonly action: PropType<ActionType | ActionType[]>;
readonly ellipsis: {
readonly type: PropType<boolean | EllipsisProps>;
readonly default: boolean | EllipsisProps;
};
readonly visible: {
readonly type: BooleanConstructor;
readonly default: true;
};
};
export type ColumnProps = ExtractPublicPropTypes<typeof columnProps>;
export type ColumnChildren = Array<ColumnProps & {
render?: (data: InnerCellProps) => VNode[];
renderHeader?: (data: InnerCellProps) => VNode[];
children?: ColumnChildren;
}>;
export declare const getDefaultColProps: () => ColumnProps;
export interface ColumnInst {
id: number;
props: ColumnProps;
slots: ReturnType<typeof useSlots>;
parentId?: number;
fixedLeft?: boolean;
fixedRight?: boolean;
colSpan?: number;
rowSpan?: number;
children?: ColumnInst[];
level?: number;
}
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
readonly label: StringConstructor;
readonly prop: StringConstructor;
readonly type: {
readonly type: PropType<"default" | "expand" | "selection">;
readonly default: "default";
};
readonly multiple: {
readonly type: BooleanConstructor;
readonly default: true;
};
readonly align: {
readonly type: PropType<"center" | "left" | "right">;
readonly default: "left";
};
readonly width: NumberConstructor;
readonly minWidth: NumberConstructor;
readonly colClassName: PropType<string | object | [] | (({ row, column, rowIndex, columnIndex, cellValue, }: {
row: RowType;
column: ColumnInst;
rowIndex: number;
columnIndex: number;
cellValue: any;
}) => string | object | [])>;
readonly colStyle: PropType<object | (({ row, column, rowIndex, columnIndex, cellValue, }: {
row: RowType;
column: ColumnInst;
rowIndex: number;
columnIndex: number;
cellValue: any;
}) => object)>;
readonly fixed: {
readonly type: PropType<boolean | "left" | "right">;
};
readonly formatter: PropType<(data: InnerCellProps) => any>;
readonly resizable: {
readonly type: BooleanConstructor;
readonly default: false;
};
readonly sortable: {
readonly type: BooleanConstructor;
readonly default: false;
};
readonly sortDirections: {
readonly type: PropType<("descend" | "ascend")[]>;
readonly default: readonly ["descend", "ascend"];
};
readonly sortOrder: {
readonly type: PropType<SortOrderType>;
readonly default: false;
};
readonly sorter: {
readonly type: PropType<SorterType>;
readonly default: "default";
};
readonly selectable: PropType<({ row, rowIndex }: {
row: RowType;
rowIndex: number;
}) => void>;
readonly action: PropType<ActionType | ActionType[]>;
readonly ellipsis: {
readonly type: PropType<boolean | EllipsisProps>;
readonly default: boolean | EllipsisProps;
};
readonly visible: {
readonly type: BooleanConstructor;
readonly default: true;
};
}>, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
readonly label: StringConstructor;
readonly prop: StringConstructor;
readonly type: {
readonly type: PropType<"default" | "expand" | "selection">;
readonly default: "default";
};
readonly multiple: {
readonly type: BooleanConstructor;
readonly default: true;
};
readonly align: {
readonly type: PropType<"center" | "left" | "right">;
readonly default: "left";
};
readonly width: NumberConstructor;
readonly minWidth: NumberConstructor;
readonly colClassName: PropType<string | object | [] | (({ row, column, rowIndex, columnIndex, cellValue, }: {
row: RowType;
column: ColumnInst;
rowIndex: number;
columnIndex: number;
cellValue: any;
}) => string | object | [])>;
readonly colStyle: PropType<object | (({ row, column, rowIndex, columnIndex, cellValue, }: {
row: RowType;
column: ColumnInst;
rowIndex: number;
columnIndex: number;
cellValue: any;
}) => object)>;
readonly fixed: {
readonly type: PropType<boolean | "left" | "right">;
};
readonly formatter: PropType<(data: InnerCellProps) => any>;
readonly resizable: {
readonly type: BooleanConstructor;
readonly default: false;
};
readonly sortable: {
readonly type: BooleanConstructor;
readonly default: false;
};
readonly sortDirections: {
readonly type: PropType<("descend" | "ascend")[]>;
readonly default: readonly ["descend", "ascend"];
};
readonly sortOrder: {
readonly type: PropType<SortOrderType>;
readonly default: false;
};
readonly sorter: {
readonly type: PropType<SorterType>;
readonly default: "default";
};
readonly selectable: PropType<({ row, rowIndex }: {
row: RowType;
rowIndex: number;
}) => void>;
readonly action: PropType<ActionType | ActionType[]>;
readonly ellipsis: {
readonly type: PropType<boolean | EllipsisProps>;
readonly default: boolean | EllipsisProps;
};
readonly visible: {
readonly type: BooleanConstructor;
readonly default: true;
};
}>> & Readonly<{}>, {
readonly type: "default" | "expand" | "selection";
readonly multiple: boolean;
readonly visible: boolean;
readonly ellipsis: boolean | EllipsisProps;
readonly resizable: boolean;
readonly align: "center" | "left" | "right";
readonly sortable: boolean;
readonly sortDirections: ("descend" | "ascend")[];
readonly sortOrder: SortOrderType;
readonly sorter: SorterType;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;