import type { RouteLocationNormalizedLoaded } from 'vue-router'; /** 路由 meta 中用于 ProIframe 的约定字段 */ export interface ProIframeRouteMeta { /** 标记为 iframe 路由(可选,供菜单/守卫识别) */ iframe?: boolean; /** * 动态模式:iframe 主地址从 query(url / iframeUrl / link / src)或 params 读取, * 无需在路由表写死 iframeUrl */ iframeDynamic?: boolean; /** @deprecated 使用 iframeDynamic */ iframeUrlFromQuery?: boolean; /** 从 route.params 读取主地址 */ iframeUrlFromParams?: boolean; /** 指定 query 键作为主地址,默认按 iframeUrl > url > link > src 优先级 */ iframeUrlQueryKey?: string; /** 指定 params 键作为主地址 */ iframeUrlParamKey?: string; /** 静态内嵌地址;支持 :id 占位(来自 params / query) */ iframeUrl?: string; /** 与 iframeUrl 相同,支持 :page 等占位 */ iframeUrlTemplate?: string; link?: string; url?: string; /** 是否将当前路由 query 拼到 iframe src(排除 iframeExcludeQueryKeys),默认 true */ iframeAppendQuery?: boolean; /** 仅合并指定 query 键;未设置则合并全部(排除保留键) */ iframeQueryKeys?: string[]; /** 不参与拼接到内嵌页的 query 键;默认排除 url/iframeUrl/link/src/title 等 */ iframeExcludeQueryKeys?: string[]; /** 解析完成后二次处理 src */ iframeTransformSrc?: (src: string, route: RouteLocationNormalizedLoaded) => string; iframeName?: string; iframeTitle?: string; iframeLoading?: boolean; iframeLoadingText?: string; iframeSandbox?: string; iframeAllow?: string; iframeLazy?: boolean; iframeFull?: boolean; iframeFixParentStyle?: boolean; /** ProIframeRouteView 是否展示默认 toolbar(刷新、新窗口打开);默认 false,传 true 开启 */ iframeToolbar?: boolean; iframeProps?: Record; } export interface ProIframeProps { src: string; name?: string; title?: string; loading?: boolean; loadingText?: string; appendRouteQuery?: boolean; sandbox?: string; allow?: string; referrerpolicy?: string; frameborder?: string | number; lazy?: boolean; /** 占满父级内容区(ProLayout main) */ full?: boolean; /** 子应用在父级 UAP/Ext iframe 中时,初始化父页样式修复 */ fixParentStyle?: boolean; }