From 73a06628ad66625fa8be18edf48819179ea931b4 Mon Sep 17 00:00:00 2001 From: SheRunFeng <541899641@qq.com> Date: Tue, 13 Sep 2022 16:49:53 +0800 Subject: [PATCH] feat(): support noCurrentApp evalute --- packages/brick-kit/src/core/Router.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/brick-kit/src/core/Router.ts b/packages/brick-kit/src/core/Router.ts index cc7f4f85a0..19d7ae2534 100644 --- a/packages/brick-kit/src/core/Router.ts +++ b/packages/brick-kit/src/core/Router.ts @@ -62,6 +62,7 @@ import { } from "../internal/getStandaloneInstalledApps"; import { mergePreviewRoutes } from "../internal/mergePreviewRoutes"; import { imagesFactory } from "../internal/images"; +import { computeRealValue } from "../internal/setProperties"; export class Router { private defaultCollapsed = false; @@ -343,7 +344,13 @@ export class Router { appBar: { breadcrumb: [], documentId: null, - noCurrentApp: currentApp.breadcrumb?.noCurrentApp ?? false, + noCurrentApp: + typeof currentApp.breadcrumb?.noCurrentApp === "string" + ? (computeRealValue( + currentApp.breadcrumb?.noCurrentApp, + this.locationContext.getCurrentContext() + ) as boolean) + : currentApp.breadcrumb?.noCurrentApp ?? false, }, flags: { redirect: undefined,