菜单功能开发

This commit is contained in:
暮光:城中城
2021-10-20 23:34:59 +08:00
parent 5cb267fba6
commit 7e57dbaade
7 changed files with 20 additions and 19 deletions

View File

@@ -32,9 +32,9 @@ public class ZyplayerDocConfig {
@EnableDocDb
public class enableDocDb{}
// @EnableDocSwagger(selfDoc = false)
// public class enableDocSwagger{}
@EnableDocSwagger(selfDoc = false)
public class enableDocSwagger{}
@EnableDocSwaggerPlus
public class enableDocSwaggerPlus{}
// @EnableDocSwaggerPlus
// public class enableDocSwaggerPlus{}
}

View File

@@ -2,10 +2,8 @@
<a-layout class="swagger-menu-trigger">
<a-layout-sider theme="light" :trigger="null" collapsible v-model:collapsed="appMenuCollapsed" :width="rightAsideWidth" style="height: 100vh;overflow: auto;">
<div class="logo">
<router-link to="/doc/console">
<img src="../../assets/logo.png">
<h1>swagger文档管理</h1>
</router-link>
<img src="../../assets/logo.png">
<h1>swagger文档管理</h1>
</div>
<menu-layout></menu-layout>
</a-layout-sider>

View File

@@ -16,6 +16,7 @@
<router-link :to="{path: menuItem.path, query: menuItem.query}">
<template v-if="menuItem.meta">
<DashboardOutlined v-if="menuItem.meta.icon === 'DashboardOutlined'"/>
<FileTextOutlined v-if="menuItem.meta.icon === 'FileTextOutlined'"/>
</template>
<span>{{menuItem.name}}</span>
</router-link>

View File

@@ -75,9 +75,11 @@
},
getSwaggerResourceList() {
customApi.post('./swagger-resources').then(res => {
this.swaggerResourceList = res || [];
if (this.swaggerResourceList.length > 0) {
this.swaggerDocChoice = this.swaggerResourceList[0].url;
if (res instanceof Array) {
this.swaggerResourceList = res || [];
if (this.swaggerResourceList.length > 0) {
this.swaggerDocChoice = this.swaggerResourceList[0].url;
}
}
});
}

View File

@@ -3,9 +3,11 @@
<a-tabs type="card" v-model:activeKey="activePage" closable @tab-click="changePage" @edit="removePageTab" style="padding: 5px 10px 0;">
<a-tab-pane :tab="pageTabNameMap[item.fullPath]||item.name" :name="getRouteRealPath(item)" :fullPath="item.fullPath" :key="item.fullPath" v-for="item in pageList"/>
</a-tabs>
<keep-alive>
<router-view :key="$route.fullPath"/>
</keep-alive>
<div class="page-body">
<keep-alive>
<router-view :key="$route.fullPath"/>
</keep-alive>
</div>
</div>
</template>
@@ -85,5 +87,6 @@
<style>
.page-layout{background: #fff;}
.page-layout .page-body{padding: 0 10px 10px 10px;}
.ant-tabs-bar{margin-bottom: 0;}
</style>

View File

@@ -11,9 +11,6 @@ let routers = [
{
path: '/doc',
name: '系统配置',
meta: {
icon: 'SettingOutlined'
},
component: PageLayout,
children: [
{
@@ -28,7 +25,7 @@ let routers = [
path: '/doc/manage',
name: '文档管理',
meta: {
icon: 'DashboardOutlined'
icon: 'FileTextOutlined'
},
component: () => import('./views/doc/DocManage.vue')
},

View File

@@ -1,5 +1,5 @@
<template>
<a-table :dataSource="dataSource" :columns="columns"/>
<a-table :dataSource="dataSource" :columns="columns"></a-table>
</template>
<script>