mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2026-01-03 20:35:29 +08:00
JeecgBoot 3.3.0 版本发布,基于代码生成器的企业级低代码平台
This commit is contained in:
@ -7,12 +7,15 @@
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from "@/store/mutation-types"
|
||||
import { TENANT_ID } from "@/store/mutation-types"
|
||||
import PageLayout from '../page/PageLayout'
|
||||
import RouteView from './RouteView'
|
||||
import {mixinDevice} from '@/utils/mixin'
|
||||
|
||||
export default {
|
||||
name: "IframePageContent",
|
||||
inject:['closeCurrent'],
|
||||
mixins: [mixinDevice],
|
||||
data () {
|
||||
return {
|
||||
url: "",
|
||||
@ -47,10 +50,21 @@
|
||||
} else {
|
||||
this.url = url
|
||||
}
|
||||
|
||||
//update-begin---author:wangshuai ---date:20220711 for:[VUEN-1638]菜单tenantId需要动态生成------------
|
||||
let tenantIdStr = '${tenantId}'
|
||||
let tenantUrl = this.url
|
||||
if (tenantUrl.indexOf(tenantIdStr) != -1) {
|
||||
let tenantId = Vue.ls.get(TENANT_ID)
|
||||
this.url = tenantUrl.replace(tenantIdStr, tenantId)
|
||||
}
|
||||
//update-end---author:wangshuai ---date:20220711 for:[VUEN-1638]菜单tenantId需要动态生成--------------
|
||||
//-----------------------------------------------------------------------------------------
|
||||
|
||||
// 是否允许打开外部页面,需要非Mobile模式且打开多页签模式
|
||||
let allowOpen = !this.isMobile() && this.$store.state.app.multipage
|
||||
/*update_begin author:wuxianquan date:20190908 for:判断打开方式,新窗口打开时this.$route.meta.internalOrExternal==true */
|
||||
if(this.$route.meta.internalOrExternal != undefined && this.$route.meta.internalOrExternal==true){
|
||||
if(allowOpen && this.$route.meta.internalOrExternal === true){
|
||||
this.closeCurrent();
|
||||
window.open(this.url);
|
||||
}
|
||||
|
||||
@ -70,7 +70,9 @@
|
||||
/* update_begin author:wuxianquan date:20190828 for: 关闭当前tab页,供子页面调用 ->望菜单能配置外链,直接弹出新页面而不是嵌入iframe #428 */
|
||||
provide(){
|
||||
return{
|
||||
closeCurrent:this.closeCurrent
|
||||
closeCurrent:this.closeCurrent,
|
||||
changeTitle: this.changeTitle,
|
||||
changeTabTitle: this.changeTabTitle,
|
||||
}
|
||||
},
|
||||
/* update_end author:wuxianquan date:20190828 for: 关闭当前tab页,供子页面调用->望菜单能配置外链,直接弹出新页面而不是嵌入iframe #428 */
|
||||
@ -176,6 +178,10 @@
|
||||
// update-end-author:sunjianlei date:20191223 for: 修复从单页模式切换回多页模式后首页不居第一位的 BUG
|
||||
|
||||
// update-begin-author:sunjianlei date:20200120 for: 动态更改页面标题
|
||||
/**
|
||||
* 修改当前页面的窗口标题
|
||||
* @param title 要修改的新标题
|
||||
*/
|
||||
changeTitle(title) {
|
||||
let projectTitle = "Jeecg-Boot 企业级低代码平台"
|
||||
// 首页特殊处理
|
||||
@ -185,6 +191,19 @@
|
||||
document.title = title + ' · ' + projectTitle
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 修改tab标签的标题
|
||||
* @param title 要修改的新标题
|
||||
* @param fullPath 要修改的路由全路径,如果不填就是修改当前路由
|
||||
*/
|
||||
changeTabTitle(title, fullPath = '') {
|
||||
if (title) {
|
||||
let currentRoute = this.pageList.find((r) => r.fullPath === (fullPath ? fullPath : this.$route.fullPath))
|
||||
if (currentRoute != null) {
|
||||
currentRoute.meta = {...currentRoute.meta, title}
|
||||
}
|
||||
}
|
||||
},
|
||||
// update-end-author:sunjianlei date:20200120 for: 动态更改页面标题
|
||||
|
||||
changePage(key) {
|
||||
|
||||
Reference in New Issue
Block a user