diff --git a/template/admin/src/layout/component/aside.vue b/template/admin/src/layout/component/aside.vue index c2d0cc66f..b82cfebc2 100644 --- a/template/admin/src/layout/component/aside.vue +++ b/template/admin/src/layout/component/aside.vue @@ -28,20 +28,19 @@ export default { components: { Vertical, Logo }, data() { return { - menuList: [], + // menuList: [], clientWidth: '', catName: '', }; }, computed: { // 设置左侧菜单的具体宽度 - // menuList() { - // this.$store.state.menus.childMenuList.length > 0 - // ? (this.$store.state.themeConfig.themeConfig.isCollapse = false) - // : (this.$store.state.themeConfig.themeConfig.isCollapse = true); - // console.log(this.$store.state.menus.childMenuList, 'this.$store.state.menus.childMenuList'); - // return this.$store.state.menus.childMenuList; - // }, + menuList() { + this.$store.state.menus.childMenuList.length > 0 + ? (this.$store.state.themeConfig.themeConfig.isCollapse = false) + : (this.$store.state.themeConfig.themeConfig.isCollapse = true); + return this.$store.state.menus.childMenuList; + }, setCollapseWidth() { let { layout, isCollapse } = this.$store.state.themeConfig.themeConfig; let asideBrColor = ''; @@ -76,12 +75,12 @@ export default { created() { this.initMenuFixed(document.body.clientWidth); this.setFilterRoutes(); - this.bus.$on('setSendColumnsChildren', (res) => { - this.menuList = res || []; - this.menuList.length > 0 - ? (this.$store.state.themeConfig.themeConfig.isCollapse = false) - : (this.$store.state.themeConfig.themeConfig.isCollapse = true); - }); + // this.bus.$on('setSendColumnsChildren', (res) => { + // this.menuList = res || []; + // this.menuList.length > 0 + // ? (this.$store.state.themeConfig.themeConfig.isCollapse = false) + // : (this.$store.state.themeConfig.themeConfig.isCollapse = true); + // }); this.bus.$on('layoutMobileResize', (res) => { this.initMenuFixed(res.clientWidth); }); diff --git a/template/admin/src/layout/component/columnsAside.vue b/template/admin/src/layout/component/columnsAside.vue index 2e4bba10c..8d0118f7d 100644 --- a/template/admin/src/layout/component/columnsAside.vue +++ b/template/admin/src/layout/component/columnsAside.vue @@ -70,8 +70,6 @@ export default { return this.$store.state.themeConfig.themeConfig.Layout; }, routesList() { - console.log('大哥'); - this.$store.state.routesList.routesList; }, }, @@ -81,7 +79,6 @@ export default { }, mounted() { this.bus.$on('routesListChange', () => { - console.log('变了大哥'); this.setFilterRoutes(); }); this.setFilterRoutes(); diff --git a/template/admin/src/layout/navMenu/vertical.vue b/template/admin/src/layout/navMenu/vertical.vue index 01befed33..52a31c3eb 100644 --- a/template/admin/src/layout/navMenu/vertical.vue +++ b/template/admin/src/layout/navMenu/vertical.vue @@ -2,6 +2,7 @@
-
- 返回上级 +
+
+ + + {{ item.key }} + + +
+
{ let data = res.data; + this.routeList = data.routeList; + if (is_edit) { this.navList = data.navList; } else { @@ -335,13 +346,28 @@ export default { open(row) { // this.rows = row; this.formItem = { - dir: row.path, + dir: row.path ? row.path + '/' : row.path, superior: 0, filedir: row.filename, fileToken: this.fileToken, }; this.getList(false, false); }, + jumpRoute(item) { + console.log + let data = { + path: item.route ? item.route : '', + filename: item.route ? item.key : '', + }; + this.open(data); + }, + refreshRoute() { + let data = { + dir: this.routeList[this.routeList.length - 1].route, + filename: this.routeList[this.routeList.length - 1].key, + }; + this.open(data); + }, // 编辑 edit(row) { this.navItem = row; @@ -911,14 +937,70 @@ export default { .mr5 { margin-right: 5px; } - +.backs-box{ + display: flex; + justify-content space-between + min-width: 800px; + max-width: max-content; + border: 1px solid #cfcfcf; + background: #f3f3f3; + .refresh{ + background: #fff; + border-left: 1px solid #cfcfcf; + padding: 0 8px 0 10px; + font-size: 16px; + font-weight: bold; + } + .refresh{ + display flex + align-items center + justify-content center + cursor: pointer; + } + .refresh:hover,.back:hover{ + background: #20a53a; + border-color: #38983b; + color: #fff; + } + .icon { + // height: 32px; + } +} .backs { cursor: pointer; display: inline-block; + display flex + align-items center + width: 100%; - .icon { - margin-bottom: 3px; + .back{ + height: 100%; + background: #fff; + border-right: 1px solid #cfcfcf; + padding: 2px 8px 0 10px; + font-size: 16px; + font-weight: bold; } + + .item:last-child{ + padding-right: 5px !important; + } + .item{ + padding: 0 0 0 8px + font-size: 12px; + line-height: 33px; + color: #555; + display flex + align-items center + .key{ + margin-right: 3px; + } + } + + .item:hover{ + background: #fff; + } + } >>>.CodeMirror {