import React from 'react'; import type { Property } from 'csstype'; import XBaseLayout, { XBaseLayoutProps } from '../base/XBaseLayout'; export interface XGridProps extends XBaseLayoutProps { /** * 列模板定义 */ columnsTemplate?: Array; /** * 行模板定义 */ rowsTemplate?: Array; /** * 列间隔 */ columnGap?: string; /** * 行间隔 */ rowGap?: string; /** * 垂直布局的起始位置 */ verticalAlign?: "start" | " end" | "center" | "spaceAround"; /** * 水平布局的起始位置 */ horizontalAlign?: "start" | " end" | "center" | "spaceAround"; contentVAlign?: string; contentHAlign?: string; contentCenter?: boolean; autoFlow?: string; autoColumns?: string; autoRows?: string; templateAreas?: string; templateRows?: string; templateColumns?: string; alignContent?: Property.AlignContent; alignItems?: Property.AlignItems; justifyContent?: Property.JustifySelf; justifyItems?: Property.JustifyItems; showDivide?: boolean; divideColor?: string; divideStyle?: string; divideWidth?: string; /** * 分隔线颜色 */ splitDividerColor?: string; /** * 拖拽宽高度回调 */ onResizeCallback?: boolean | (() => void); } /** * 对css中grid布局方式的封装 * @name Grid布局 * @groupName 网格 */ export default class XGrid extends XBaseLayout { static ComponentName: string; static defaultProps: { columnsTemplate: string[]; rowsTemplate: string[]; columnGap: string; rowGap: string; width: string; height: string; splitDividerColor: string; lazyChildren: boolean; styleType: string; hasBox: boolean; showBorder: any; overflow: string; boxStyle: {}; visible: boolean; grid: number[]; gridSpan: number[]; parent: string; pureRender: boolean; /** * 对css中grid布局方式的封装 * @name Grid布局 * @groupName 网格 */ dataSourceUrl: string; filterData: {}; mustHasFilter: boolean; }; dividerDiV: any; initPos: object; dragIndex: number; isResizeRow: boolean; constructor(props: XGridProps); isResize(): boolean; getCurrentStyle(): any; render(): React.JSX.Element; renderDivider(style: any): React.JSX.Element; componentDidMount(): void; componentWillUnmount(): void; handleDragStart: (index: any, e: any, x: any, y: any) => void; handleDragMove: (e: any, x: any, y: any) => void; setTemplate(list: any): void; onMouseDown(index: any): (e: any) => void; onMouseMove: (e: any) => void; onTouchMove: (e: any) => void; handleDragEnd: (e: any) => void; onTouchStart(index: any): (e: any) => void; }