@whitesev/pops
Version:
弹窗库,包含了alert、confirm、prompt、drawer、folder、loading、iframe、panel、tooltip、searchSuggestion、rightClickMenu组件
53 lines (51 loc) • 1.48 kB
TypeScript
import type { PopsAlertConfig } from "../components/alert/types";
import type { PopsDrawerConfig } from "../components/drawer/types";
import type { PopsFolderConfig } from "../components/folder/types";
import type { PopsIframeConfig } from "../components/iframe/types";
import type { PopsLoadingConfig } from "../components/loading/types";
import type { PopsPanelConfig } from "../components/panel/types";
import type { PopsPromptConfig } from "../components/prompt/types/index";
/**
* 遮罩层配置
*/
export interface PopsMaskConfig {
/**
* 是否启用遮罩层,默认false
* @default false
*/
enable?: boolean;
/**
* 点击事件配置
*/
clickEvent?: {
/**
* (可选)点击遮罩层是否触发关闭事件,默认false
* @default false
*/
toClose?: boolean;
/**
* (可选)点击遮罩层是否触发隐藏事件,默认false
* @default false
*/
toHide?: boolean;
};
/**
* 遮罩层自定义的点击事件
*/
clickCallBack?:
| ((
/** 当toClose为true,它是关闭弹窗,当toHide为true,它是隐藏弹窗 */
continueExec: () => void | Promise<void>,
/** 配置信息 */
config:
| PopsAlertConfig
| PopsDrawerConfig
| PopsIframeConfig
| PopsPromptConfig
| PopsFolderConfig
| PopsLoadingConfig
| PopsPanelConfig
) => void)
| undefined
| null;
}