菜单功能开发
This commit is contained in:
@@ -32,9 +32,9 @@ public class ZyplayerDocConfig {
|
|||||||
@EnableDocDb
|
@EnableDocDb
|
||||||
public class enableDocDb{}
|
public class enableDocDb{}
|
||||||
|
|
||||||
// @EnableDocSwagger(selfDoc = false)
|
@EnableDocSwagger(selfDoc = false)
|
||||||
// public class enableDocSwagger{}
|
public class enableDocSwagger{}
|
||||||
|
|
||||||
@EnableDocSwaggerPlus
|
// @EnableDocSwaggerPlus
|
||||||
public class enableDocSwaggerPlus{}
|
// public class enableDocSwaggerPlus{}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,8 @@
|
|||||||
<a-layout class="swagger-menu-trigger">
|
<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;">
|
<a-layout-sider theme="light" :trigger="null" collapsible v-model:collapsed="appMenuCollapsed" :width="rightAsideWidth" style="height: 100vh;overflow: auto;">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
<router-link to="/doc/console">
|
<img src="../../assets/logo.png">
|
||||||
<img src="../../assets/logo.png">
|
<h1>swagger文档管理</h1>
|
||||||
<h1>swagger文档管理</h1>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
</div>
|
||||||
<menu-layout></menu-layout>
|
<menu-layout></menu-layout>
|
||||||
</a-layout-sider>
|
</a-layout-sider>
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
<router-link :to="{path: menuItem.path, query: menuItem.query}">
|
<router-link :to="{path: menuItem.path, query: menuItem.query}">
|
||||||
<template v-if="menuItem.meta">
|
<template v-if="menuItem.meta">
|
||||||
<DashboardOutlined v-if="menuItem.meta.icon === 'DashboardOutlined'"/>
|
<DashboardOutlined v-if="menuItem.meta.icon === 'DashboardOutlined'"/>
|
||||||
|
<FileTextOutlined v-if="menuItem.meta.icon === 'FileTextOutlined'"/>
|
||||||
</template>
|
</template>
|
||||||
<span>{{menuItem.name}}</span>
|
<span>{{menuItem.name}}</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|||||||
@@ -75,9 +75,11 @@
|
|||||||
},
|
},
|
||||||
getSwaggerResourceList() {
|
getSwaggerResourceList() {
|
||||||
customApi.post('./swagger-resources').then(res => {
|
customApi.post('./swagger-resources').then(res => {
|
||||||
this.swaggerResourceList = res || [];
|
if (res instanceof Array) {
|
||||||
if (this.swaggerResourceList.length > 0) {
|
this.swaggerResourceList = res || [];
|
||||||
this.swaggerDocChoice = this.swaggerResourceList[0].url;
|
if (this.swaggerResourceList.length > 0) {
|
||||||
|
this.swaggerDocChoice = this.swaggerResourceList[0].url;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,11 @@
|
|||||||
<a-tabs type="card" v-model:activeKey="activePage" closable @tab-click="changePage" @edit="removePageTab" style="padding: 5px 10px 0;">
|
<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-tab-pane :tab="pageTabNameMap[item.fullPath]||item.name" :name="getRouteRealPath(item)" :fullPath="item.fullPath" :key="item.fullPath" v-for="item in pageList"/>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
<keep-alive>
|
<div class="page-body">
|
||||||
<router-view :key="$route.fullPath"/>
|
<keep-alive>
|
||||||
</keep-alive>
|
<router-view :key="$route.fullPath"/>
|
||||||
|
</keep-alive>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -85,5 +87,6 @@
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.page-layout{background: #fff;}
|
.page-layout{background: #fff;}
|
||||||
|
.page-layout .page-body{padding: 0 10px 10px 10px;}
|
||||||
.ant-tabs-bar{margin-bottom: 0;}
|
.ant-tabs-bar{margin-bottom: 0;}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -11,9 +11,6 @@ let routers = [
|
|||||||
{
|
{
|
||||||
path: '/doc',
|
path: '/doc',
|
||||||
name: '系统配置',
|
name: '系统配置',
|
||||||
meta: {
|
|
||||||
icon: 'SettingOutlined'
|
|
||||||
},
|
|
||||||
component: PageLayout,
|
component: PageLayout,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
@@ -28,7 +25,7 @@ let routers = [
|
|||||||
path: '/doc/manage',
|
path: '/doc/manage',
|
||||||
name: '文档管理',
|
name: '文档管理',
|
||||||
meta: {
|
meta: {
|
||||||
icon: 'DashboardOutlined'
|
icon: 'FileTextOutlined'
|
||||||
},
|
},
|
||||||
component: () => import('./views/doc/DocManage.vue')
|
component: () => import('./views/doc/DocManage.vue')
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-table :dataSource="dataSource" :columns="columns"/>
|
<a-table :dataSource="dataSource" :columns="columns"></a-table>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
Reference in New Issue
Block a user