mirror of
https://github.com/veops/cmdb.git
synced 2025-08-10 22:26:29 +08:00
feat:ui 全面升级 (#444)
This commit is contained in:
@@ -87,21 +87,21 @@ export default {
|
||||
computed: {
|
||||
...mapState({
|
||||
// 动态主路由
|
||||
mainMenu: state => state.routes.appRoutes,
|
||||
mainMenu: (state) => state.routes.appRoutes,
|
||||
}),
|
||||
contentPaddingLeft() {
|
||||
if (!this.fixSidebar || this.isMobile()) {
|
||||
return '0'
|
||||
}
|
||||
if (this.sidebarOpened) {
|
||||
return '200px'
|
||||
return '220px'
|
||||
}
|
||||
return '80px'
|
||||
},
|
||||
sideBarMenu() {
|
||||
const sideMenus = this.mainMenu.filter(item => this.$route.path.startsWith(item.path))
|
||||
const sideMenus = this.mainMenu.filter((item) => this.$route.path.startsWith(item.path))
|
||||
if (sideMenus.length > 1) {
|
||||
return sideMenus.find(item => item.path !== '/').children
|
||||
return sideMenus.find((item) => item.path !== '/').children
|
||||
} else {
|
||||
return sideMenus[0].children
|
||||
}
|
||||
@@ -110,6 +110,9 @@ export default {
|
||||
provide() {
|
||||
return {
|
||||
reloadBoard: this.reload,
|
||||
collapsed: () => {
|
||||
return this.collapsed
|
||||
},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -146,15 +149,6 @@ export default {
|
||||
this.alive = true
|
||||
})
|
||||
},
|
||||
paddingCalc() {
|
||||
let left = ''
|
||||
if (this.sidebarOpened) {
|
||||
left = this.isDesktop() ? '200px' : '80px'
|
||||
} else {
|
||||
left = (this.isMobile() && '0') || (this.fixSidebar && '80px') || '0'
|
||||
}
|
||||
return left
|
||||
},
|
||||
menuSelect() {
|
||||
if (!this.isDesktop()) {
|
||||
this.collapsed = false
|
||||
|
Reference in New Issue
Block a user