export interface IPortal { readonly instance: T; readonly host: HTMLElement | null; attach(): Promise; detach(): void; } declare abstract class BasePortal implements IPortal { protected component: () => any; protected attached: boolean; protected portalInstance: any; protected _instance: T | undefined; protected target: HTMLElement | null; protected context: any; protected _host: HTMLElement | null; constructor(component: () => any, options?: { /** * 挂载目标 * * 为`null`的话 则代表创建完成之后手动执行挂载操作 * * 默认为 `document.body` */ target?: HTMLElement | null; context?: any; }); /** * 等待当前setup上下文全部执行完毕 * * @remark * 如果当前上下文没有全部执行完成的话就调用`attach`的话 会导致后面的 composition API 都没办法正确挂载到正确的地方 */ protected waitSetupFinish(): Promise; get instance(): T | undefined; get host(): HTMLElement | null; abstract attach(): Promise; abstract detach(): void; } export declare class Vue3Portal extends BasePortal { constructor(component: () => any, options?: { /** * 挂载目标 * * 为`null`的话 则代表创建完成之后手动执行挂载操作 * * 默认为 `document.body` */ target?: HTMLElement | null; context?: any; }); attach(): Promise; detach(): undefined; private getExposeOrProxy; private createAppContext; private mergeAppContext; private createPortal; private createOutlet; } /** * * @experimental * * @remarks * `vue3` 下需要注意以下几点 * - 其挂载内容如果为存在子组件的话 必须走导入模式 * ``` * // good * S * import {ElButton} from 'element-plus'; * * // bad 不要用这种 不会被解析成组件 * S * ``` * */ export declare const Portal: new (component: () => any, options?: { /** * 挂载目标 * * 为`null`的话 则代表创建完成之后手动执行挂载操作 * * 默认为 `document.body` */ target?: HTMLElement | null; context?: any; }) => IPortal; export {}; //# sourceMappingURL=portal.d.ts.map