@whitesev/pops
Version:
弹窗库
63 lines (61 loc) • 1.25 kB
text/typescript
import type { PopsAlertDetails } from "./indexType";
export const PopsAlertConfig = (): DeepRequired<PopsAlertDetails> => {
return {
title: {
text: "默认标题",
position: "left",
html: false,
style: "",
},
content: {
text: "默认内容",
html: false,
style: "",
},
btn: {
position: "flex-end",
ok: {
size: void 0 as any,
enable: true,
icon: void 0 as any,
rightIcon: false,
iconIsLoading: false,
text: "确定",
type: "primary",
callback: function (details: any) {
details.close();
},
},
close: {
enable: true,
callback: function (details: any) {
details.close();
},
},
},
useShadowRoot: true,
class: "",
only: false,
width: "350px",
height: "200px",
position: "center",
animation: "pops-anim-fadein-zoom",
zIndex: 10000,
mask: {
enable: false,
clickEvent: {
toClose: false,
toHide: false,
},
clickCallBack: null,
},
drag: false,
dragLimit: true,
dragExtraDistance: 3,
dragMoveCallBack() {},
dragEndCallBack() {},
forbiddenScroll: false,
style: null,
beforeAppendToPageCallBack() {},
} as DeepRequired<PopsAlertDetails>;
};