drip-table
Version:
A tiny and powerful enterprise-class solution for building tables.
38 lines (37 loc) • 1.18 kB
TypeScript
import React from 'react';
import { DripTableColumnSchema, DripTableRecordTypeBase, SchemaObject } from "../../../types";
import { DripTableComponentProps } from '../component';
export declare type DTCSwitchColumnSchema = DripTableColumnSchema<'switch', {
style?: React.CSSProperties;
/**
* 暗纹提示
*/
placeholder?: string;
/**
* 值回显强制与数据绑定,默认为true
*/
bindValue?: boolean;
/**
* 事件名,给用户区分事件用
*/
event?: string;
}>;
export interface DTCSwitchEvent {
type: 'drip-switch-change';
payload: {
name: string;
value: boolean;
};
}
interface DTCSwitchProps<RecordType extends DripTableRecordTypeBase> extends DripTableComponentProps<RecordType, DTCSwitchColumnSchema> {
}
interface DTCSwitchState {
}
export default class DTCSwitch<RecordType extends DripTableRecordTypeBase> extends React.PureComponent<DTCSwitchProps<RecordType>, DTCSwitchState> {
static componentName: DTCSwitchColumnSchema['component'];
static schema: SchemaObject;
private get disabled();
private get value();
render(): React.JSX.Element;
}
export {};