drip-table
Version:
A tiny and powerful enterprise-class solution for building tables.
56 lines (55 loc) • 2.64 kB
TypeScript
/**
* This file is part of the drip-table project.
* @link : https://drip-table.jd.com/
* @author : qianjing29 (qianjing29@jd.com)
* @modifier : qianjing29 (qianjing29@jd.com)
* @copyright: Copyright (c) 2020 JD Network Technology Co., Ltd.
*/
import React from 'react';
import { type DripTableColumnSchema, type DripTableDataColumnSchema, type DripTableExtraOptions, type DripTableRecordTypeBase, type DripTableRecordTypeWithSubtable, type SchemaObject } from "../../../types";
import { type ExtractDripTableExtraOption } from "../../../index";
import { DripTableBuiltInColumnSchema } from '..';
import { DripTableComponentProps } from '../component';
export declare type DTCPopoverColumnSchema<CustomColumnSchema extends DripTableDataColumnSchema = never> = DripTableColumnSchema<'popover', {
/**
* 悬浮框自定义样式
*/
style?: string | Record<string, string>;
/**
* 弹出层自定义样式
*/
overlayStyle?: string | Record<string, string>;
/**
* 弹出层内部自定义样式
*/
overlayInnerStyle?: string | Record<string, string>;
/**
* 悬浮框触发器
*/
trigger?: 'click' | 'hover';
/**
* 悬浮框显示位置
*/
placement?: 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
/**
* 悬浮框渲染 Schema
*/
popover: DripTableBuiltInColumnSchema<CustomColumnSchema> | CustomColumnSchema;
/**
* 内容 Schema
*/
content: DripTableBuiltInColumnSchema<CustomColumnSchema> | CustomColumnSchema;
}>;
interface DTCPopoverProps<RecordType extends DripTableRecordTypeWithSubtable<DripTableRecordTypeBase, ExtractDripTableExtraOption<ExtraOptions, 'SubtableDataSourceKey'>>, ExtraOptions extends Partial<DripTableExtraOptions> = never> extends DripTableComponentProps<RecordType, DTCPopoverColumnSchema<ExtractDripTableExtraOption<ExtraOptions, 'CustomColumnSchema'>>> {
}
interface DTCPopoverState {
visible: boolean;
}
export default class DTCPopover<RecordType extends DripTableRecordTypeWithSubtable<DripTableRecordTypeBase, ExtractDripTableExtraOption<ExtraOptions, 'SubtableDataSourceKey'>>, ExtraOptions extends Partial<DripTableExtraOptions> = never> extends React.PureComponent<DTCPopoverProps<RecordType, ExtraOptions>, DTCPopoverState> {
static componentName: DTCPopoverColumnSchema<DripTableExtraOptions['CustomColumnSchema']>['component'];
static schema: SchemaObject;
state: DTCPopoverState;
private parseReactCSS;
render(): React.JSX.Element;
}
export {};