From 0dc91d7729c71fe63abb0e1eac033e06b47c1d7f Mon Sep 17 00:00:00 2001 From: Cano1997 <58964671+Cano1997@users.noreply.github.com> Date: Wed, 27 Aug 2025 20:19:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9EmobHomeRouteMode?= =?UTF-8?q?=E5=85=A8=E5=B1=80=E5=8F=82=E6=95=B0=EF=BC=8C=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E8=B7=AF=E7=94=B1=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E6=97=B6=E8=B7=B3=E8=BD=AC=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/util/open-view-util/open-view-util.ts | 17 +++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d27f27d9..455d0291 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - 更新密码框支持明文,暗文切换功能 - 应用菜单(列表样式)识别分组配置 - 新增mobShowViewHeader全局参数,控制移动端视图头是否显示,默认显示 +- 新增mobHomeRouteMode全局参数,控制移动端路由跳转时跳转方式 ### Change diff --git a/src/util/open-view-util/open-view-util.ts b/src/util/open-view-util/open-view-util.ts index 9f558453..794e8a33 100644 --- a/src/util/open-view-util/open-view-util.ts +++ b/src/util/open-view-util/open-view-util.ts @@ -18,6 +18,7 @@ import { routerCallback, } from '@ibiz-template/vue3-util'; import { Router } from 'vue-router'; +import { isNil } from 'ramda'; import { FloatingUIConfig } from '../app-popover/app-popover-component'; /** @@ -60,12 +61,16 @@ export class OpenViewUtil implements IOpenViewUtil { opts: IData = {}, ): Promise { const appView = await ibiz.hub.config.view.get(appViewId!); - const { path } = await generateRoutePath( - appView, - this.router.currentRoute.value, - context, - params, - ); + const route = this.router.currentRoute.value; + const { path } = await generateRoutePath(appView, route, context, params); + // 配置mobHomeRouteMode为replace,视图位于home视图下,且界面行为中未配置modaloption.replace时,设置replace为true + if ( + route.meta.home && + isNil(opts.replace) && + ibiz.config.mob.mobHomeRouteMode === 'replace' + ) { + opts.replace = true; + } return routerCallback.open(this.router, path, opts); } -- Gitee