提交 ce3bc320 编写于 作者: Neuromancer255's avatar Neuromancer255

返回按钮显示逻辑调整

上级 19ffec34
......@@ -135,7 +135,7 @@
<#if view.getPSAppDataEntity()??>
<#assign appDataEntity = view.getPSAppDataEntity() />
<#if appDataEntity.isMajor()>
if (this.viewDefaultUsage && Object.keys(localStorage).length > 0) {
if (this.viewDefaultUsage !== "indexView" && Object.keys(localStorage).length > 0) {
Object.keys(localStorage).forEach((item: string) => {
if (item.startsWith(this.context.srfsessionid)) {
localStorage.removeItem(item);
......@@ -203,7 +203,7 @@ ${P.getLogicCode(logic, "LOGIC.vue").code}
<#if userCloseView??>
${userCloseView}
<#else>
if (this.viewDefaultUsage) {
if (this.viewDefaultUsage === "routerView" ) {
this.$store.commit("deletePage", this.$route.fullPath);
this.$router.go(-1);
} else {
......
......@@ -74,7 +74,7 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
* @type {boolean}
* @memberof ${srfclassname('${view.name}')}Base
*/
@Prop({ default: true }) protected viewDefaultUsage!: boolean;
@Prop({ default: "routerView" }) protected viewDefaultUsage!: string;
/**
* 视图标识
......@@ -239,7 +239,7 @@ ${P.getCtrlCode(ctrl, 'CONTROL.vue').code}
*/
get isShowBackButton(): boolean {
// 存在路由,非路由使用,嵌入
if (!this.viewDefaultUsage) {
if (this.viewDefaultUsage === "indexView") {
return false;
}
return true;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册