29 lines
743 B
Plaintext
29 lines
743 B
Plaintext
import { PermissionsEnum } from '@/enums/permissionsEnum';
|
|
import type { ButtonProps, ButtonType } from 'ant-design-vue/lib/button';
|
|
|
|
export interface ActionItem extends ButtonProps {
|
|
onClick?: Fn;
|
|
label?: string;
|
|
color?: 'success' | 'error' | 'warning';
|
|
icon?: any;
|
|
type?: ButtonType | undefined;
|
|
popConfirm?: PopConfirm;
|
|
disabled?: boolean;
|
|
divider?: boolean;
|
|
danger?: boolean;
|
|
key?: string;
|
|
// 权限编码控制是否显示
|
|
auth?: PermissionsEnum | PermissionsEnum[] | string | string[];
|
|
// 业务控制是否显示
|
|
ifShow?: boolean | ((action: ActionItem) => boolean);
|
|
}
|
|
|
|
export interface PopConfirm {
|
|
title: string;
|
|
okText?: string;
|
|
cancelText?: string;
|
|
confirm: Fn;
|
|
cancel?: Fn;
|
|
icon?: string;
|
|
}
|