share-light
Version:
42 lines (41 loc) • 1.32 kB
TypeScript
import { SHARE_TYPE_MAP } from './types-helper';
export type ShareType = typeof SHARE_TYPE_MAP[keyof typeof SHARE_TYPE_MAP];
export interface ShareObject {
title?: string;
desc?: string;
icon?: string;
link?: string;
callback?: (_shareType?: ShareType) => {};
path?: string | null;
type?: string | number | null;
miniprogram_link?: string;
miniprogramAppId?: string;
gid?: number;
forceHistoryMode?: boolean;
isWzydShare?: boolean;
wzydShareText?: string;
hideShareType?: Array<ShareType>;
tipMap?: {
copyTextSuccess?: string;
copyTextFail?: string;
dialogTitle?: string;
dialogMessage?: string;
dialogConfirmButton?: string;
};
showToast?: (message: string) => any;
showConfirmDialog?: (options: {
title?: string;
message?: string;
confirmButtonText?: string;
showCancelButton?: boolean;
}) => any;
postGetMiniProgramOpenLink?: (options: ShareObject) => Promise<any>;
configWx?: (apiList: string[], openTagList?: string[]) => Promise<any>;
}
export interface ShareUIObject {
initCommShareUI?: (callbackName: string) => void;
initCommShareTip?: () => void;
showCommShareUI?: () => void;
showCommShareTip?: () => void;
openShareUI?: () => void;
}