guide-modal
Usage
门户场景
引入js后,会在window下挂载GuideModal对象,使用方法:
GuideModal.showPortal({
userGuid,
serviceHost,
appCode,
style,
contentMaxHeight,
callback,
onCloseButtonClick,
showAfterLoading,
hideIfNoData,
onShow,
});
方法签名如下:
interface GuidePortalConfig {
userGuid: string;
serviceHost: string;
appCode: string;
contentMaxHeight?: number;
style: {
top?: number | string;
left?: number | string;
right?: number | string;
bottom?: number | string;
width?: number | string;
'z-index'?: number;
};
showAfterLoading?: boolean;
hideIfNoData?: boolean;
callback?(url: string, e: MouseEvent, done: (closeModal: boolean) => void): void;
onCloseButtonClick?(hideModal: () => void): void;
onShow?: () => void;
}
interface GuideModalType {
showPortal: (config: GuidePortalConfig) => () => void;
}
declare var GuideModal: GuideModalType;
表单场景
引入js后,会在window下挂载GuideModal对象,使用方法:
GuideModal.showModal({
operate,
dataStr,
userGuid,
serviceHost,
appCode,
buttonCode,
contentMaxHeight,
showAfterLoading,
hideIfNoData,
callback,
onCloseButtonClick,
onShow,
});
方法签名如下:
interface GuideModalConfig {
operate: number;
dataStr: string;
userGuid: string;
serviceHost: string;
appCode: string;
buttonCode: string;
contentMaxHeight? number;
showAfterLoading?: boolean;
hideIfNoData?: boolean;
callback?(url: string, e: MouseEvent, done: (closeModal: boolean) => void): void;
onCloseButtonClick?(hideModal: () => void): void;
onShow?: () => void;
}
interface GuideModalType {
showModal: (config: GuideModalConfig) => () => void;
}
declare var GuideModal: GuideModalType;
为下一个用户生成一条信息
引入js后,会在window下挂载GuideModal对象,使用方法:
GuideModal.notifyNext({
userGuid,
serviceHost,
appCode,
code,
});
方法签名如下:
interface GuideNotifyConfig {
userGuid: string;
serviceHost: string;
appCode: string;
code: string;
sync?: boolean;
}
interface GuideModalType {
notifyNext: (config: GuideNotifyConfig) => () => void;
}
declare var GuideModal: GuideModalType;
为多个用户生成信息
引入js后,会在window下挂载GuideModal对象,使用方法:
GuideModal.notifyAll({
serviceHost,
appCode,
statusList,
sync?: boolean;
});
方法签名如下:
interface GuideNotifyAllConfig {
statusList: Array<{userGuid: string, code: string}>;
serviceHost: string;
appCode: string;
sync?: boolean;
}
interface GuideModalType {
notifyAll: (config: GuideNotifyAllConfig) => () => void;
}
declare var GuideModal: GuideModalType;
指引内容抽屉
引入js后,会在window下挂载Drawer类,使用方法:
const drawer = new Drawer({
width,
afterVisibleChange,
stepCode,
sectionCode,
targetOffset,
});
方法签名如下:
interface DrawerConfig {
width?: number;
afterVisibleChange?: () => void;
stepCode: string | number;
sectionCode?: string | number;
targetOffset?: number;
}
declare var DrawerType: (config: DrawerConfig) => () => void;
changelog
- v0.0.0: 弹窗新增最大高度设置,超出显示滚动条; 添加通知多个接口;
- v0.0.1: portal弹窗富文本内段落不显示分割线; 弹窗配置添加hideIfNoData, showAfterLoading及onShow配置;
- v0.0.2: 公共服务路径修改