diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue
index 3e4fcbb..9ec849e 100644
--- a/src/layout/components/Sidebar/index.vue
+++ b/src/layout/components/Sidebar/index.vue
@@ -22,43 +22,33 @@
-
标签
+ 标签
-
+ :key="tag.tagId">
-
-
+
- -
-
-
+ @click="tagClick(tag)">
+
{{ tag.name }}
-
@@ -125,6 +115,7 @@ export default {
showCopyBtn: false,
takeUpSpace: 0,
tagList: [],
+ showTag: false
}
},
computed: {
@@ -173,18 +164,28 @@ export default {
},
watch: {
isCollapse(val){
+ },
+ $route(to) {
+ console.log(to.meta.menuType)
+ this.showTag = to.meta !== undefined && to.meta.menuType !== undefined && to.meta.menuType === 0;
}
},
mounted() {
- tagApi.tagList({userId: this.$store.state.user.userId,}).then(res => {
- this.tagList = res.data
- })
+ this.getTagList()
Bus.$on('msg/file/change', (msg) => this.onmessage(msg))
},
destroyed() {
Bus.$off('msg/file/change')
},
methods: {
+ getTagList() {
+ if (this.$route.meta.menuType === 0) {
+ this.showTag = true
+ }
+ tagApi.tagList({userId: this.$store.state.user.userId}).then(res => {
+ this.tagList = res.data
+ })
+ },
onmessage(msg) {
const takeUpSpace = msg.space
if (takeUpSpace) {
@@ -293,6 +294,24 @@ export default {
.el-scrollbar {
padding-bottom: 15px;
}
+ >>> .submenu-title-noDropdown {
+ padding-left: 15px !important;
+ padding-right: 10px !important;
+ }
+ >>> .el-submenu__title {
+ padding-left: 15px !important;
+ padding-right: 10px !important;
+ .el-submenu__icon-arrow {
+ right: 15px;
+ }
+ }
+ >>> .nest-menu {
+ .el-menu-item {
+ padding-left: 25px !important;
+ padding-right: 20px !important;
+ min-width: unset;
+ }
+ }
}
.quota-space {
font-size: 14px;
diff --git a/src/styles/variables.scss b/src/styles/variables.scss
index bb4ddc8..d075fc9 100644
--- a/src/styles/variables.scss
+++ b/src/styles/variables.scss
@@ -9,7 +9,7 @@ $menuHover:#d9d9d9;
$subMenuBg:#f5f5f5;
$subMenuHover:#d9d9d9;
-$sideBarWidth: 150px;
+$sideBarWidth: 160px;
// the :export directive is the magic sauce for webpack
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
diff --git a/src/views/setting/cloudManager.vue b/src/views/setting/cloudManager.vue
index d8e36d7..db6cb6d 100644
--- a/src/views/setting/cloudManager.vue
+++ b/src/views/setting/cloudManager.vue
@@ -13,7 +13,7 @@