

简体中文
interface IInitConfig {
debug?: boolean
}
function init(ability: UIAbility, stage: window.WindowStage, config?: IInitConfig)
function getUniMPRunPath(appID: string): string
function isExistsUniMP(appId: string): boolean
type ReleaseWgtToRunPathCallback = (code: 1 | -1, error?: Error) => void
function releaseWgtToRunPath(appID: string, wgtPath: string, callback: ReleaseWgtToRunPathCallback)
interface IAppVersionInfo {
name: string
code: string
}
function getAppVersionInfo(appId: string): IAppVersionInfo | null
interface ICapsuleStyle {
backgroundColor?: string
textColor?: string
highlightColor?: string
borderColor?: string
}
interface ICapsuleMenuActionSheetItem {
id: string
title: string
}
interface IOpenUniMPConfig {
showCapsuleButton?: boolean
capsuleMenuActionSheetItems?: ICapsuleMenuActionSheetItem[]
capsuleButtonStyle?: ICapsuleStyle
redirectPath?: string
extraData?: Object // 传递给小程序的额外数据,小程序中onLaunch,uni.getLaunchOptionsSync可以获取
}
export interface IUniMP {
hide(): void
show(): void
close(): void
sendUniMPEvent: (event: string, data: ESObject) => void
on(event: 'uniMPEvent', callback: (event: string, data: ESObject, notify: (...args: ESObject[]) => void) => void): void
on(event: 'menuItemClick', callback: (id: string) => void): void
on(event: 'close' | 'show' | 'hide', callback: () => void): void
off(name: string, callback: Function): void
}
function openUniMP(appID: string, config?: IOpenUniMPConfig): IUniMP
hide(): void
show(): void
close(): void
sendUniMPEvent: (event: string, data: ESObject) => void
on(event: 'uniMPEvent', callback: (event: string, data: ESObject, notify: (...args: ESObject[]) => void) => void): void
on(event: 'menuItemClick', callback: (id: string) => void): void
on(event: 'close' | 'show' | 'hide', callback: () => void): void
off(name: string, callback: Function): void