优化开发展示

This commit is contained in:
aixianling
2022-06-13 10:46:55 +08:00
parent 2a4d9b2b1c
commit b35314bf83
10 changed files with 19 additions and 21 deletions

View File

@@ -8,6 +8,7 @@
@click.stop="openKidMenu(item)">
<i class="prep-icon" :class="item.style||'iconfont iconloudongmoxing'"/>
<span class="menuName fill" v-text="item.label"/>
<el-badge type="warning" :hidden="!item.project" :value="item.project"/>
<i v-if="item.children" class="iconfont" :class="arrowIcon(item.showChildren)"/>
</div>
<div class="kidMenu" v-if="item.showChildren" @click.stop>
@@ -41,7 +42,14 @@ export default {
...mapState(['user', 'apps']),
navs() {
let reg = new RegExp(`.*${this.searchApp?.replace(/-/g,'')||''}.*`, 'gi')
return (this.apps || []).filter(e => !this.searchApp || reg?.test(e.name) || reg?.test(e.label))
return (this.apps || []).filter(e => !this.searchApp || reg?.test(e.name) || reg?.test(e.label)).map(e => {
if (/project/.test(e.path)) {
e.project = e.path.replace(/.*project\/([^\/]+)\/.+/, '$1')
} else if (/core/.test(e.path)) {
e.project = "core"
}
return e
})
},
isConsoleRoute() {
return this.$route.name == "工作台"
@@ -104,7 +112,7 @@ export default {
</script>
<style lang="scss" scoped>
.sliderNav {
width: 200px;
min-width: 200px;
height: 100%;
transition: width .1s;
display: flex;