UNPKG

aile-capacitor-aiff

Version:

AIFF WebView plugin for Capacitor with iframe-based web implementation

49 lines (48 loc) 1.29 kB
/** * AIFF框架集成示例 * 展示了如何使用Capacitor-AIFF插件与AIFF前端框架进行交互 */ import type { AiffWebViewPlugin } from './definitions'; export interface AiffMessage { type: string; data?: any; id?: string; } export declare class AiffIntegration { /** * 打开AIFF页面并建立通信 */ static openAiffPage(webView: AiffWebViewPlugin, url: string, options?: any): Promise<void>; /** * 向AIFF页面发送消息 */ static sendMessageToAiff(webView: AiffWebViewPlugin, message: AiffMessage): Promise<void>; /** * 发送数据到AIFF页面 */ static sendDataToAiff(webView: AiffWebViewPlugin, data: any, type?: string): Promise<void>; /** * 处理来自AIFF页面的消息 */ private static handleAiffMessage; /** * 处理AIFF页面的数据请求 */ private static handleAiffRequest; /** * 处理AIFF页面的操作请求 */ private static handleAiffAction; /** * 获取用户信息(示例实现) */ private static getUserInfo; /** * 获取设备信息(示例实现) */ private static getDeviceInfo; /** * 获取应用配置(示例实现) */ private static getAppConfig; }