/* * @Description: * @Author: Format-qi 283810417@qq.com * @Date: 2022-05-12 15:27:52 * @LastEditors: Format-qi 283810417@qq.com * @LastEditTime: 2022-08-02 16:50:46 */ import { ButtonProps } from 'ant-design-vue/es/button/buttonTypes'; import { TooltipProps } from 'ant-design-vue/es/tooltip/Tooltip'; import { RoleEnum } from '/@/enums/roleEnum'; export interface ActionItem extends ButtonProps { onClick?: Fn; label?: string; //按钮颜色 color?: 'success' | 'error' | 'warning' | string; icon?: string; iconSize?: number; iconColor?: string; textColor?: string; popConfirm?: PopConfirm; disabled?: boolean; divider?: boolean; // 权限编码控制是否显示 auth?: RoleEnum | RoleEnum[] | string | string[]; // 业务控制是否显示 ifShow?: boolean | ((action: ActionItem) => boolean); tooltip?: string | TooltipProps; } export interface PopConfirm { title: string; okText?: string; cancelText?: string; confirm: Fn; cancel?: Fn; icon?: string; placement?: | 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom' | 'bottomLeft' | 'bottomRight'; }