diff --git a/CHANGELOG.md b/CHANGELOG.md index d27f27d905272c0136e12555622fad9cba9ccbc4..455d029173f0c05ab596c09eb135924b4062fa95 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 9f5584534673a7d4dff052cd04d8631e24a6a861..794e8a33774c8383ab7b8364380e9b447afe54da 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); }