提交 3d57cefb 编写于 作者: ibizdev's avatar ibizdev

chitanda 发布系统代码

上级 0cfcfe0a
import { Vue } from 'vue-property-decorator';
import { FooterItemsService } from '@/studio-core/service/FooterItemsService';
import { AppService } from '@/studio-core/service/app-service/AppService';
import AppMenusModel from '@/widgets/app/central-appmenu/central-appmenu-model';
/**
......@@ -14,6 +15,15 @@ export class CentralBase extends Vue {
*/
protected counterServiceArray: any[] = [];
/**
* 应用服务
*
* @protected
* @type {AppService}
* @memberof CentralBase
*/
protected appService: AppService = new AppService();
/**
* 应用菜单集合
*
......@@ -267,7 +277,7 @@ export class CentralBase extends Vue {
</template> : null}
{styleMode === 'DEFAULT' ? <tab-page-exp></tab-page-exp> : null}
<div class="view-warp">
<app-keep-alive routerList={this.$appService.navHistory.historyList}>
<app-keep-alive routerList={this.appService.navHistory.historyList}>
<router-view key={this.$route.fullPath}></router-view>
</app-keep-alive>
</div>
......
......@@ -132,11 +132,12 @@ export class AppNavHistoryBase {
/**
* 重置路由缓存
*
* @param {number} [num=0]
* @memberof AppNavHistoryBase
*/
public reset(): void {
this.historyList.splice(0, this.historyList.length);
this.metaList.splice(0, this.metaList.length);
public reset(num: number = 0): void {
this.historyList.splice(num, this.historyList.length);
this.metaList.splice(num, this.metaList.length);
}
/**
......@@ -192,4 +193,14 @@ export class AppNavHistoryBase {
}
}
/**
* 缓存后退
*
* @memberof AppNavHistoryBase
*/
public pop(): void {
this.historyList.pop();
this.metaList.pop();
}
}
\ No newline at end of file
......@@ -466,6 +466,9 @@ export class ViewBase extends Vue {
this.$emit('close', [args]);
} else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
} else {
this.$router.back();
this.$appService.navHistory.pop();
}
}
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册