comic-plus
Version:
<p align="center"> <img width="200px" src="./logo.png"/> </p>
84 lines (82 loc) • 2.97 kB
TypeScript
import { CSSProperties, ExtractPropTypes, PropType, VNode } from 'vue';
import { Span, TableData, TreeProps } from './type';
import { ComicSize } from '../../../utils';
import { TableColumnProps } from './table-column/column.props';
export declare const tableProps: {
readonly data: PropType<TableData[]>;
readonly border: BooleanConstructor;
readonly size: PropType<ComicSize>;
readonly showHeader: {
readonly type: BooleanConstructor;
readonly default: true;
};
readonly height: StringConstructor;
readonly maxHeight: StringConstructor;
readonly headerRowClass: StringConstructor;
readonly headerCellClass: PropType<string | ((data: {
col: any;
colIndex: number;
}) => string)>;
readonly rowClass: PropType<string | ((data: {
row: any;
rowIndex: number;
}) => string)>;
readonly cellClass: PropType<string | ((data: {
row: any;
rowIndex: number;
col: any;
colIndex: number;
}) => string)>;
readonly headerRowStyle: PropType<CSSProperties>;
readonly headerCellStyle: PropType<CSSProperties | ((data: {
col: any;
colIndex: number;
}) => CSSProperties)>;
readonly rowStyle: PropType<CSSProperties | ((data: {
row: any;
rowIndex: number;
}) => CSSProperties)>;
readonly cellStyle: PropType<CSSProperties | ((data: {
row: any;
rowIndex: number;
col: any;
colIndex: number;
}) => CSSProperties)>;
readonly stripe: BooleanConstructor;
readonly stripeColors: PropType<CSSProperties["color"][]>;
readonly highlightCurrentRow: BooleanConstructor;
readonly highlightColor: PropType<CSSProperties["color"]>;
readonly rowKey: StringConstructor;
readonly treeProps: PropType<TreeProps>;
readonly indent: {
readonly type: NumberConstructor;
readonly default: 15;
};
readonly lazy: BooleanConstructor;
readonly load: PropType<(row: TableData, resolve: (arr: TableData[]) => void) => void>;
readonly showSummary: BooleanConstructor;
readonly sumText: {
readonly type: StringConstructor;
readonly default: "合计";
};
readonly summaryMethod: PropType<(params: {
columns: TableColumnProps[];
datas: TableData[];
}) => (string | number | VNode)[]>;
readonly spanMethod: PropType<(params: {
row: TableData;
rowIndex: number;
col: TableColumnProps;
colIndex: number;
}) => Span>;
readonly nullSymbol: StringConstructor;
};
export type tableProps = ExtractPropTypes<typeof tableProps>;
export declare const tableEmits: {
'select-row': (value: TableData[]) => boolean;
'current-change': (value: TableData, oldValue: TableData) => boolean;
};
export type tableEmits = {
(event: 'select-row', value: TableData[]): void;
(event: 'current-change', value: TableData, oldValue: TableData): void;
};