import { PopoverProps } from 'element-plus'; import { Component, VNode } from 'vue'; export interface PopconfirmProps { /** * 标题 */ title?: string; /** * 文字内容 */ description?: string; placement?: PopoverProps['placement']; confirmButtonText?: string; cancelButtonText?: string; icon?: string | Component; iconColor?: string; hideIcon?: boolean; /** * 是否将 popover 的下拉列表插入至 body 元素 */ teleported?: boolean; /** * 当 popover 组件长时间不触发且 persistent 属性设置为 false 时, popover 将会被删除 */ persistent?: boolean; /** * 最大宽度 */ width?: number; /** * 确定事件 */ onConfirm?: (formValues?: any) => any | Promise; /** * 取消事件 */ onCancel?: () => void; } export type PopconfirmSlots = { /** * 作用域插槽, 一般传递操作按钮 */ default: () => VNode; /** * 自定义内容 (可以传递Form组件) */ content: () => VNode; };