@visactor/vtable
Version:
canvas table width high performance
94 lines (93 loc) • 2.52 kB
TypeScript
import type { ITextAttribute } from './../vrender';
import type { Placement } from './table-engine';
export interface IIconBase {
type: 'text' | 'svg' | 'path' | 'image';
width?: number;
height?: number;
positionType: IconPosition;
marginRight?: number;
marginLeft?: number;
name: string;
funcType?: IconFuncTypeEnum | string;
hover?: {
width?: number;
height?: number;
bgColor: string;
image?: string;
};
cursor?: string;
visibleTime?: 'always' | 'mouseenter_cell' | 'click_cell';
tooltip?: {
title: string;
placement?: Placement;
style?: {
fontSize?: number;
fontFamily?: string;
color?: string;
padding?: number[];
bgColor?: string;
arrowMark?: boolean;
maxWidth?: number;
maxHeight?: number;
};
disappearDelay?: number;
};
interactive?: boolean;
}
export interface TextIcon extends IIconBase {
type: 'text';
content: string;
style?: ITextAttribute;
}
export interface ImageIcon extends IIconBase {
type: 'image';
src: string;
shape?: 'circle' | 'square';
isGif?: boolean;
}
export interface PathIcon extends IIconBase {
type: 'path';
path: string;
color?: string;
}
export interface SvgIcon extends IIconBase {
type: 'svg';
svg: string;
}
export declare enum IconPosition {
inlineFront = "inlineFront",
inlineEnd = "inlineEnd",
left = "left",
right = "right",
absoluteRight = "absoluteRight",
contentLeft = "contentLeft",
contentRight = "contentRight",
absolute = "absolute"
}
export declare enum IconFuncTypeEnum {
frozen = "frozen",
sort = "sort",
dropDown = "dropDown",
dropDownState = "dropDownState",
play = "play",
damagePic = "damagePic",
expand = "expand",
collapse = "collapse",
drillDown = "drillDown",
drillUp = "drillUp",
dragReorder = "dragReorder"
}
export declare enum InternalIconName {
upwardIconName = "sort_upward",
downwardIconName = "sort_downward",
normalIconName = "sort_normal",
freezeIconName = "freeze",
frozenIconName = "frozen",
frozenCurrentIconName = "frozenCurrent",
dropdownIconName = "dropdownIcon",
expandIconName = "expand",
collapseIconName = "collapse",
dragReorderIconName = "dragReorder",
loadingIconName = "loading"
}
export type ColumnIconOption = ImageIcon | SvgIcon | TextIcon;