Commit 7add0cb7 by 无尘

fix: 修改测试菜单

parent 6beabdb2
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2018-10-10 14:44:45
* @LastEditors: 无尘
* @LastEditTime: 2020-09-24 10:54:12
* @LastEditTime: 2020-09-24 11:46:30
-->
<template>
<div class="enterprise-wrap">
......@@ -47,10 +47,29 @@ export default {
},
mounted() {
const that = this;
if (window.history && window.history.pushState) {
history.pushState(null, null, document.URL);
window.addEventListener('popstate', that.goBack, false);
}
that.contentHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 64 + 'px';
},
destroyed(){
const that = this;
window.removeEventListener('popstate', that.goBack, false);
},
methods: {
/**
* @description: 回退
* @author: 无尘
*/
goBack(){
const that = this;
if (that.$route.path == '/apps') {
// replace替换原路由,作用是避免回退死循环
that.$router.replace({ path: '/app-list' });
}
},
/**
* @description: 处理简单数组-->父子级
* @param {Array} data
* @return {Array}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment