import { VNode } from 'vue'; /** 弹窗属性 */ export interface PopWindowProps { /**默认 0 */ left?: string; /**默认 0 */ top?: string; /**默认 100px */ width: string; /**默认 100px */ height: string; /**默认 absolute */ position?: 'absolute' | 'relative'; /** 弹框Id,默认会生成一段随机字符串,相同的id只会存在一个 默认:popwindow_随机数字 */ id?: string; /** 给节点添加标签,用于统一处理 */ tag?: string; /** 弹出框组件的挂载父容器的Id,传入'#App',则挂载到#App 默认挂载到body中 */ appendParent?: string; /** 开启动画,默认true 需要引入animate.css 文档:https://animate.style/ */ animate?: boolean; /** 弹框出现时动画,默认:animate__animated animate__faster animate__fadeIn */ animateInClass?: string; /** 弹框清除时动画,默认:animate__animated animate__faster animate__fadeOut */ animateOutClass?: string; /** 关闭事件回调 */ onClose?: () => void; /** 渲染函数,如果不传,则需要传显示的Component */ render?: (scope: PopWindowRenderScope) => VNode; [key: string]: any; } /** 弹窗信息,保存在数组中,所有弹窗都可以在数组中查询到 */ export interface PopWindowInfoProps { id: string; tag?: string; /** VNode */ node: any; /** 配置信息 */ option: PopWindowProps; } /** render回调的类型 */ export interface PopWindowRenderScope { close: () => void; option: PopWindowProps; }