mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-08 22:57:11 +08:00
chore: 新增关于项目菜单(该菜单从动态路由调整为静态,且不再需要鉴权)
This commit is contained in:
1
src/assets/icons/api-management.svg
Normal file
1
src/assets/icons/api-management.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg width="24" height="24" viewBox="0 0 48 48" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M4 15a1 1 0 001 1h2a1 1 0 001-1V8h7a1 1 0 001-1V5a1 1 0 00-1-1H6a2 2 0 00-2 2v9zm4 18a1 1 0 00-1-1H5a1 1 0 00-1 1v9a2 2 0 002 2h9a1 1 0 001-1v-2a1 1 0 00-1-1H8v-7zm35-17a1 1 0 001-1V6a2 2 0 00-2-2h-9a1 1 0 00-1 1v2a1 1 0 001 1h7v7a1 1 0 001 1h2zm1 17a1 1 0 00-1-1h-2a1 1 0 00-1 1v7h-7a1 1 0 00-1 1v2a1 1 0 001 1h9a2 2 0 002-2v-9zM32.835 11h-6.108c-6.512 0-11.882 4.804-12.636 11h-1.992c-.382 0-.52.046-.66.134a.855.855 0 00-.325.378c-.074.162-.114.324-.114.77v1.436c0 .446.04.608.114.77.075.163.185.291.324.378.14.088.279.134.66.134h2.157c1.179 5.706 6.315 10 12.472 10h6.108c.405 0 .552-.041.7-.12a.819.819 0 00.344-.337c.079-.145.121-.29.121-.688V31h.901c.382 0 .52-.046.66-.134a.855.855 0 00.325-.378c.074-.162.114-.324.114-.77v-1.436c0-.446-.04-.608-.114-.77a.855.855 0 00-.325-.378c-.14-.088-.278-.134-.66-.134H34v-7h.901c.382 0 .52-.046.66-.134a.855.855 0 00.325-.378c.074-.162.114-.324.114-.77v-1.436c0-.446-.04-.608-.114-.77a.855.855 0 00-.325-.378c-.14-.088-.278-.134-.66-.134H34v-3.855c0-.398-.042-.543-.121-.688a.819.819 0 00-.344-.338c-.148-.078-.295-.119-.7-.119zm-2.744 3.571h-3.637c-5.02 0-9.09 3.998-9.09 8.929s4.07 8.929 9.09 8.929h3.637V14.57z" fill="currentColor"/></svg>
|
After Width: | Height: | Size: 1.3 KiB |
5
src/assets/icons/arco.svg
Normal file
5
src/assets/icons/arco.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<svg width="22" height="16" viewBox="0 0 22 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.72938 13.2709C1.31587 11.8234 1.31587 9.51246 2.72938 8.06503L7.9367 2.73274C9.39842 1.23594 11.8058 1.23594 13.2675 2.73274C14.681 4.18017 14.681 6.49116 13.2675 7.93859L8.06017 13.2709C6.59845 14.7677 4.19111 14.7677 2.72938 13.2709Z" fill="#12D2AC"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.94084 2.7323C9.40256 1.23549 11.8099 1.23549 13.2716 2.7323L18.4789 8.06459C19.8925 9.51202 19.8925 11.823 18.4789 13.2704C17.0172 14.7672 14.6099 14.7672 13.1482 13.2704L7.94084 7.93815C6.52733 6.49071 6.52733 4.17973 7.94084 2.7323Z" fill="#307AF2"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.7384 2.93044C9.30781 1.32337 11.8925 1.32337 13.4619 2.93045L15.8075 5.33229L10.6002 10.6646L5.39285 5.33229L7.7384 2.93044Z" fill="#0057FE"/>
|
||||
</svg>
|
After Width: | Height: | Size: 909 B |
1
src/assets/icons/code-release-managment.svg
Normal file
1
src/assets/icons/code-release-managment.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg width="24" height="24" viewBox="0 0 48 48" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M26.5 6a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H9v30h29a1 1 0 001-1V22.5a.5.5 0 01.5-.5h3a.5.5 0 01.5.5V42a2 2 0 01-2 2H7a2 2 0 01-2-2V8a2 2 0 012-2h19.5zm3.768 14.707l3.864 1.035-4.141 15.455-3.864-1.035 4.141-15.455zM21.485 20l2.829 2.828-5.683 5.682 5.268 5.268-2.828 2.829-7.778-7.779.025-.025-.318-.318L21.485 20zM39.5 4a.5.5 0 01.5.5V9h4.5a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H40v4.5a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V13h-4.5a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5H36V4.5a.5.5 0 01.5-.5h3z" fill="currentColor"/></svg>
|
After Width: | Height: | Size: 621 B |
9
src/assets/icons/continew.svg
Normal file
9
src/assets/icons/continew.svg
Normal file
@@ -0,0 +1,9 @@
|
||||
<svg width="33" height="33" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 174.8 204">
|
||||
<path fill="#307AF2" d="M86.7,0l88,51v.2l-16.3,9.4v-.2L86.7,18.9Zm71.8,143.5,16.3,9.4v.2L86.8,204h0l-16.3-9.4,16.3-9.4h0l71.7-41.5v-.2Z"/>
|
||||
<path fill="#12D2AC" d="M16.3,143.5v.2L58,167.8l-16.3,9.4L0,153.1v-.2Z"/>
|
||||
<path fill="#12D2AC" d="M104.1,93,15.9,143.8l-.2-.1V124.9l.2.1L87.7,83.6,104.1,93Z"/>
|
||||
<path fill="#0057FE" d="M88.1,0,.1,51v.2l16.3,9.4v-.2L88.1,18.9Z"/>
|
||||
<path fill="#307AF2" d="M.1,50.9.2,152.6l.2.1,16.3-9.4-.2-.1-.1-82.9L.1,50.9Z"/>
|
||||
<path fill="#0057FE" d="M174.7,50.9l-.1,101.7-.2.1-16.3-9.4.2-.1.1-82.9Z"/>
|
||||
<path fill="#12D2AC" d="M41.7,158.5l16.1,9.4,100.6-58.7V90.4Z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 683 B |
26
src/assets/icons/gitcode.svg
Normal file
26
src/assets/icons/gitcode.svg
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="96px" height="96px" viewBox="0 0 96 96" enable-background="new 0 0 96 96" xml:space="preserve"> <image id="image0" width="96" height="96" x="0" y="0"
|
||||
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAMAAADVRocKAAAAIGNIUk0AAHomAACAhAAA+gAAAIDo
|
||||
AAB1MAAA6mAAADqYAAAXcJy6UTwAAAA/UExURQAAANsgQNogP9sgPdogPtogP9ogPtogP9ogP9og
|
||||
PtsgQN8gQNsgPtogPt0gPtggPdsgPtwgQNogPtogPv///3+ZkFoAAAATdFJOUwAgUHCfz9+/r4BA
|
||||
EO9gb3CQMM9sefpCAAAAAWJLR0QUkt/JNQAAAAd0SU1FB+gLFw4SAP63MKEAAAM4SURBVGje7Vrd
|
||||
mqMwCFUT8+9sHN//XdfWWasBEhL124td7mbaniMHAoS26/4561d7BngQclTLjyltrPP3gQu5Qx9t
|
||||
lMMd6FYvtAXpLqH7KYf+I9fUHBRvQxF+c6OJggv/prD1ER8UG34TqjK0Ze1TMzU6ffHVOej0i61+
|
||||
bIB/meRFoh8b8dejx2Ho66KbBKKMP7fI/7FiMl3EX8aSPhfxlyVfmy7pv1k2V30tfpzBv2SOQNbB
|
||||
6/XshhqCryp49Vb7GziVCUDyVpMTTE+E05kml+L5zp1bZVDq/bcyYv7zIZES0CVvQt/qrB5f0Ebg
|
||||
Td6xQwAzlFd+z3Vd0R+CGTSzCM4u0BHoAf7CnBfsIUiZSoQcAW4T3Bl0RlTEATZB109SaymyMZuW
|
||||
Zol4hp2pO4dch+CrOx3Aqpy8Dvt3FbrVAfuwA51+2IHuaQfmpx0Yqk+xn6xcy8NmMlrh5tzQCGOc
|
||||
PWQev7UFHQXxXLJGofzFJxisRMIHyihUHL2Ruw4YPRZaUFvCxyhAodC0A7zZzxY+FEn8mYW/zlQn
|
||||
DcDL9ADrmARnEYAHdIy5HpxVAAT0wOL594chQ5ApRJws2kx9wgDOQZcx/hX3k0qyhqDrrRlZQgX6
|
||||
ocq3Xe8GYddylz0We67gczXbXmu82QkDCPZEArnHG3sBUSr1XpN9SlC5miG13l9Iq11sJEhPyS51
|
||||
yly6rpMmCQJQYVpXopYgAAXANhJE6jnTsxwaCb4pFKBRWx4l+X4o2UCj0BSFRIhjWwFFMjbgp6uI
|
||||
Y0EAZ61BpPSed+7soKKG2noBbvLnR4TXzEoGgJ9Oh0gjYS9aV3OgRaSNHeu2kZ1LcNUEp08BCbgr
|
||||
b2TTHZCegs7MunwdRzfRmLzESrPwDYcz2IfweiwWwjQx+PeTxB8qEM+UG0le14v9GuP7QURNzxZk
|
||||
6Mp799ferji0RDodrm9+l3xDvINBZZPiOoMqTFVXGUr4VxnK+E1fcVXhdzWXgMQ0tzpObTJVTDt9
|
||||
5VcJb3nq1pTVTvCbxx6JGgpGWUd0YlM0wW9CMVI2mEs74j7mS6wW13+dsPYVnETF6bbfPngnrNHj
|
||||
uxesPUHLOM33/bDivz1pvwFpJhpiuTDDXwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyNC0xMS0yM1Qx
|
||||
NDoxODowMCswMDowMJCjfg0AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjQtMTEtMjNUMTQ6MTg6MDAr
|
||||
MDA6MDDh/saxAAAAKHRFWHRkYXRlOnRpbWVzdGFtcAAyMDI0LTExLTIzVDE0OjE4OjAwKzAwOjAw
|
||||
tuvnbgAAAABJRU5ErkJggg==" />
|
||||
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
37
src/components/GiIframe/index.vue
Normal file
37
src/components/GiIframe/index.vue
Normal file
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<a-spin class="gi-iframe" :loading="loading">
|
||||
<iframe class="iframe" :src="props.src" @load="onLoad"></iframe>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
defineOptions({ name: 'GiIframe' })
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
src: '',
|
||||
})
|
||||
|
||||
interface Props {
|
||||
src: string
|
||||
}
|
||||
|
||||
const loading = ref(true)
|
||||
|
||||
const onLoad = () => {
|
||||
loading.value = false
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.gi-iframe {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.iframe {
|
||||
border: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
@@ -62,6 +62,50 @@ export const systemRoutes: RouteRecordRaw[] = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/about',
|
||||
name: 'About',
|
||||
component: Layout,
|
||||
meta: { title: '关于项目', icon: 'apps', hidden: false, sort: 999 },
|
||||
children: [
|
||||
{
|
||||
path: '/about/document',
|
||||
name: 'AboutDocument',
|
||||
meta: { title: '项目文档', icon: 'file', hidden: false, keepAlive: true },
|
||||
children: [
|
||||
{
|
||||
path: '/about/document/api',
|
||||
component: () => import('@/views/about/document/api/index.vue'),
|
||||
meta: { title: 'API文档', icon: 'continew', hidden: false, keepAlive: true },
|
||||
},
|
||||
{
|
||||
path: '/about/document/arco-design-vue',
|
||||
component: () => import('@/views/about/document/arco-design-vue/index.vue'),
|
||||
meta: { title: 'Arco Design文档', icon: 'arco', hidden: false, keepAlive: true },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/about/source',
|
||||
name: 'AboutSource',
|
||||
meta: { title: '开源地址', icon: 'github', hidden: false },
|
||||
children: [
|
||||
{
|
||||
path: 'https://gitee.com/continew/continew-admin',
|
||||
meta: { title: 'Gitee', icon: 'gitee', hidden: false },
|
||||
},
|
||||
{
|
||||
path: 'https://gitcode.com/continew/continew-admin',
|
||||
meta: { title: 'GitCode', icon: 'gitcode', hidden: false },
|
||||
},
|
||||
{
|
||||
path: 'https://github.com/continew-org/continew-admin',
|
||||
meta: { title: 'GitHub', icon: 'github', hidden: false },
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
// 固定路由(默认路由)
|
||||
|
@@ -44,7 +44,6 @@ const transformComponentView = (component: string) => {
|
||||
*/
|
||||
const formatAsyncRoutes = (menus: RouteItem[]) => {
|
||||
if (!menus.length) return []
|
||||
menus.sort((a, b) => (a?.sort ?? 0) - (b?.sort ?? 0)) // 排序
|
||||
const pathMap = new Map()
|
||||
const routes = mapTree(menus, (item) => {
|
||||
pathMap.set(item.id, item.path)
|
||||
@@ -103,7 +102,9 @@ const storeSetup = () => {
|
||||
|
||||
// 合并路由
|
||||
const setRoutes = (data: RouteRecordRaw[]) => {
|
||||
// 合并路由并排序
|
||||
routes.value = [...constantRoutes, ...systemRoutes].concat(data)
|
||||
.sort((a, b) => (a.meta?.sort ?? 0) - (b.meta?.sort ?? 0))
|
||||
asyncRoutes.value = data
|
||||
}
|
||||
|
||||
|
1
src/types/components.d.ts
vendored
1
src/types/components.d.ts
vendored
@@ -28,6 +28,7 @@ declare module 'vue' {
|
||||
GiFooter: typeof import('./../components/GiFooter/index.vue')['default']
|
||||
GiForm: typeof import('./../components/GiForm/src/GiForm.vue')['default']
|
||||
GiIconSelector: typeof import('./../components/GiIconSelector/index.vue')['default']
|
||||
GiIframe: typeof import('./../components/GiIframe/index.vue')['default']
|
||||
GiOption: typeof import('./../components/GiOption/index.vue')['default']
|
||||
GiOptionItem: typeof import('./../components/GiOptionItem/index.vue')['default']
|
||||
GiOverFlowTags: typeof import('./../components/GiOverFlowTags/index.vue')['default']
|
||||
|
9
src/views/about/document/api/index.vue
Normal file
9
src/views/about/document/api/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<template>
|
||||
<GiIframe src="https://api.continew.top/doc.html"></GiIframe>
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
defineOptions({ name: 'AboutDocumentApi' })
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
9
src/views/about/document/arco-design-vue/index.vue
Normal file
9
src/views/about/document/arco-design-vue/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<template>
|
||||
<GiIframe src="https://arco.design/vue/component/button"></GiIframe>
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
defineOptions({ name: 'AboutDocumentArcoDesignVue' })
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
Reference in New Issue
Block a user