dai-cli
详细信息
site-admin-iview/build/config.js 2(+1 -1)
diff --git a/site-admin-iview/build/config.js b/site-admin-iview/build/config.js
index 0387511..961d7fb 100644
--- a/site-admin-iview/build/config.js
+++ b/site-admin-iview/build/config.js
@@ -14,7 +14,7 @@ export default {
],
webpack: {
devServer: {
- sockHost: '192.168.88.88'
+ // sockHost: '192.168.88.88'
}
}
};
diff --git a/site-admin-iview/main/config/navConfig.js b/site-admin-iview/main/config/navConfig.js
index 401b269..b7834d9 100644
--- a/site-admin-iview/main/config/navConfig.js
+++ b/site-admin-iview/main/config/navConfig.js
@@ -53,7 +53,8 @@ const navConfig = [
title: '系统设置',
children: [
{ to: '/member/typeList', icon: 'ios-paper', title: '会员管理' },
- { to: '/version/list', icon: 'ios-paper', title: '系统设置' }
+ { to: '/version/list', icon: 'ios-paper', title: '系统设置' },
+ { to: '/routerMap', icon: 'ios-paper', title: '路由地图' }
]
}
];
site-admin-iview/src/page/routerMap.vue 23(+20 -3)
diff --git a/site-admin-iview/src/page/routerMap.vue b/site-admin-iview/src/page/routerMap.vue
index 2802682..8b9b946 100644
--- a/site-admin-iview/src/page/routerMap.vue
+++ b/site-admin-iview/src/page/routerMap.vue
@@ -1,6 +1,6 @@
<style lang="less" scoped>
.page-map {
- color: #333;
+ color: #333;
}
</style>
<template>
@@ -28,8 +28,25 @@ export default {
default: ''
}
},
- template:
- '<div style="padding-left:20px;"><div @click="$router.push({path:base + route.path})">{{route.meta && route.meta.pageName || route.path}}({{base + route.path}})</div><route-item :base="base + route.path" :route="item" v-for="(item,index) in route.children" :key="index"></route-item></div>'
+ methods: {
+ getRouterName() {
+ return (this.route.meta && this.route.meta.pageName) || this.route.path;
+ },
+ getRouterPath() {
+ let path = this.base + '/' + this.route.path;
+ while (path.indexOf('//') > -1) {
+ path = path.replaceAll('//', '/');
+ }
+ return path;
+ },
+ toRouterPath() {
+ this.$router.push({ path: this.getRouterPath() });
+ }
+ },
+ template: `<div style="padding-left:30px;">
+ <div style="cursor: pointer;" @click="toRouterPath">{{getRouterName()}} => ({{getRouterPath()}})</div>
+ <route-item :base="getRouterPath()" :route="item" v-for="(item,index) in route.children" :key="index"></route-item>
+ </div>`
}
},
props: [],