UNPKG

e-virt-table

Version:

A powerful data table based on canvas. You can use it as data grid、Microsoft Excel or Google sheets. It supports virtual scroll、cell edit etc.

68 lines (67 loc) 1.78 kB
import type Context from './Context'; import type { Align, Column, Fixed, Render, Rules, Type, VerticalAlign } from './types'; import BaseCell from './BaseCell'; export default class CellHeader extends BaseCell { align: Align; verticalAlign: VerticalAlign; fixed?: Fixed; widthFillDisable: boolean; type: Type | ''; operation: boolean; editorType: string; level: number; text: string; displayText: string; colspan: number; rowspan: number; row: any; key: string; required: boolean; readonly: boolean; children: Column[]; column: Column; colIndex: number; rowKey: string; rules?: Rules; hasChildren: boolean; render: Render; style: Partial<CSSStyleDeclaration>; drawX: number; drawY: number; drawCellBgColor: string; drawTextColor: string; drawImageX: number; drawImageY: number; drawImageWidth: number; drawImageHeight: number; drawImageName: string; drawImageSource: HTMLImageElement | undefined; constructor(ctx: Context, colIndex: number, x: number, y: number, width: number, height: number, column: Column); /** * 是否可见,覆盖基类方法,表头是跟y滚动条没有关系的所以不需要加滚动参数 * @returns */ isVerticalVisible(): boolean; /** * 更新样式 */ updateStyle(): void; updateContainer(): void; update(): void; draw(): void; private drawSelection; getText(): string; /** * 获取样式 */ getOverlayerViewsStyle(): { position: string; overflow: string; left: string; top: string; width: string; height: string; pointerEvents: string; userSelect: string; }; }