diff --git a/src/components/Icon/IconFile.vue b/src/components/Icon/IconFile.vue index ec334c1..794555e 100644 --- a/src/components/Icon/IconFile.vue +++ b/src/components/Icon/IconFile.vue @@ -21,7 +21,7 @@
- +
@@ -31,7 +31,7 @@
- +
@@ -92,6 +92,9 @@ computed: { findIconClass(){ let suffix = this.item.suffix; + if(!suffix && this.item.fileName){ + suffix = this.item.fileName.substring(this.item.fileName.lastIndexOf('.') + 1); + } if(iconClass.has(suffix)){ return iconClass.get(suffix) } diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 323a6bf..7bc9d73 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -4,33 +4,38 @@ -
- -
- - - -
- - - - 设置 - - - +
+
{{username}}
+
+ +
+ + + +
+ + + + 设置 + + + - + - - + + - - - 退出登录 - - -
+ + + 退出登录 + + + +
+
+
@@ -43,6 +48,7 @@ export default { data() { return { imageUrl: process.env.VUE_APP_BASE_API + '/view/thumbnail?jmal-token=' + this.$store.state.user.token + '&id=', + username: this.$store.state.user.name, } }, components: { @@ -92,6 +98,21 @@ export default { float: left; } + .right-content { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: end; + -ms-flex-pack: end; + justify-content: flex-end; + + .right-username { + line-height: 50px; + margin-right: 10px; + } + + } + .right-menu { float: right; height: 100%; diff --git a/src/router/index.js b/src/router/index.js index 0221d89..54040b6 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -147,6 +147,8 @@ export const constantRoutes = [ path: '', name: 'setting', component: () => import('@/views/setting/index'), + meta: { title: '设置' }, + hidden: true } ] },