type 增加actionBtnPanelProps类型定义
This commit is contained in:
parent
3415e5c7db
commit
b6a9b2f2a1
|
|
@ -0,0 +1,30 @@
|
|||
/// <reference types="react" />
|
||||
import { ButtonProps, SpaceProps } from 'antd';
|
||||
declare type Item = {
|
||||
icon?: string | React.ReactNode;
|
||||
label?: string;
|
||||
action?: string;
|
||||
auth: boolean;
|
||||
type?: 'a' | 'button';
|
||||
index?: number;
|
||||
alerted?: boolean;
|
||||
alertTitle?: string;
|
||||
alertContent?: string;
|
||||
confirmText?: string;
|
||||
cancelText?: string;
|
||||
render?: React.ReactNode;
|
||||
beforeAction?: (item: Item) => boolean | Promise<boolean>;
|
||||
afterAction?: (item: Item) => void;
|
||||
onClick?: (item: Item) => void | Promise<void>;
|
||||
buttonProps?: Omit<ButtonProps, 'onClick'>;
|
||||
filter?: () => boolean;
|
||||
};
|
||||
export declare type ActionBtnPanelProps = {
|
||||
entity: string;
|
||||
actions: string[];
|
||||
items: Item[];
|
||||
spaceProps: SpaceProps;
|
||||
mode: 'cell' | 'table-cell';
|
||||
column: 3;
|
||||
};
|
||||
export {};
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
import {
|
||||
ButtonProps,
|
||||
SpaceProps,
|
||||
} from 'antd';
|
||||
|
||||
type Item = {
|
||||
icon?: string | React.ReactNode;
|
||||
label?: string;
|
||||
action?: string;
|
||||
auth: boolean;
|
||||
type?: 'a' | 'button';
|
||||
index?: number;
|
||||
alerted?: boolean;
|
||||
alertTitle?: string;
|
||||
alertContent?: string;
|
||||
confirmText?: string;
|
||||
cancelText?: string;
|
||||
render?: React.ReactNode;
|
||||
beforeAction?: (item: Item) => boolean | Promise<boolean>;
|
||||
afterAction?: (item: Item) => void;
|
||||
onClick?: (item: Item) => void | Promise<void>;
|
||||
buttonProps?: Omit<ButtonProps, 'onClick'>;
|
||||
filter?: () => boolean;
|
||||
};
|
||||
|
||||
export type ActionBtnPanelProps = {
|
||||
entity: string;
|
||||
actions: string[];
|
||||
items: Item[];
|
||||
spaceProps: SpaceProps;
|
||||
mode: 'cell' | 'table-cell';
|
||||
column: 3;
|
||||
}
|
||||
Loading…
Reference in New Issue