import type { RendererProps } from 'jamis-core'; import type { BaseSchema } from '../types'; export interface WujieSchema extends BaseSchema { type: 'wujie'; /** 唯一性用户必须保证 */ name?: string; /** 需要渲染的url */ url: string; /** 路由同步开关, false刷新无效,但是前进后退依然有效 */ sync?: boolean; /** 子应用短路径替换,路由同步时生效 */ prefix?: { [key: string]: string; }; /** 子应用保活模式,state不会丢失 */ alive?: boolean; /** 注入给子应用的数据 */ props?: { [key: string]: any; }; /** js采用fiber模式执行 */ fiber?: boolean; /** 子应用采用降级iframe方案 */ degrade?: boolean; /** 自定义运行iframe的属性 */ attrs?: { [key: string]: any; }; /** 自定义降级渲染iframe的属性 */ degradeAttrs?: { [key: string]: any; }; /** 代码替换钩子 */ replace?: (codeText: string) => string; /** 自定义fetch,资源和接口 */ fetch?: (input: RequestInfo, init?: RequestInit) => Promise; /** 子应插件 */ plugins?: Array; } export interface WujieProps extends RendererProps, Omit { }