diff --git a/packages/runtime/CHANGELOG.md b/packages/runtime/CHANGELOG.md index d4f66a5f6325f71c1224b88ba1ae05f5187bc854..71919999423b0e185fad5343c2d387708b5fcbcc 100644 --- a/packages/runtime/CHANGELOG.md +++ b/packages/runtime/CHANGELOG.md @@ -11,6 +11,7 @@ - 卡片部件新增sortDelistItems状态变量,支持卡片自定义过滤功能 - 新增移动端树全局配置enableClickNav和控件动态参数enableclicknav,是否启用点击打开导航视图功能 +- 打开重定向视图时支持识别view://协议、route://协议 ### Changed diff --git a/packages/runtime/src/utils/open-redirect-view/open-redirect-view.ts b/packages/runtime/src/utils/open-redirect-view/open-redirect-view.ts index 68ae83751d1ad7868e134088f56acc7f35d1f348..d67dd977196cdd41f9bfa25a45ed1495896b63b0 100644 --- a/packages/runtime/src/utils/open-redirect-view/open-redirect-view.ts +++ b/packages/runtime/src/utils/open-redirect-view/open-redirect-view.ts @@ -287,6 +287,22 @@ export async function getDERedirectToView( if (linkUrl.startsWith('http://') || linkUrl.startsWith('https://')) { return { type: 'url', url: linkUrl }; } + if (linkUrl.startsWith('view://')) { + const result = parseViewProtocol(linkUrl); + Object.assign(context, result.context); + Object.assign(params, result.params); + return { + type: 'view', + viewId: result.viewId, + context, + params, + opts: { ...opts, data: [curData] }, + }; + } + if (linkUrl.startsWith('route://')) { + const routeUrl = `/${linkUrl.split('route://')[1]}`; + return { type: 'url', url: routeUrl }; + } if (linkUrl.startsWith('appredirectview?')) { const toView = await getLocalOpenWFRedirectView( context,