Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
Gu-ZT committed Jun 13, 2024
1 parent 989df75 commit 239a3b4
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 35 deletions.
37 changes: 27 additions & 10 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import {
HomeOutlined,
PicLeftOutlined,
InfoCircleOutlined,
RedEnvelopeOutlined
RedEnvelopeOutlined,
AppstoreOutlined,
CloudOutlined,
} from '@ant-design/icons-vue';
import {createFromIconfontCN} from '@ant-design/icons-vue';
import Urls from '@/assets/urls.json';
Expand All @@ -23,29 +25,39 @@ const items = ref([
key: 'home',
icon: () => h(HomeOutlined),
label: '主页',
title: '主页',
url: '/'
title: '主页'
},
{
key: 'view',
icon: () => h(PicLeftOutlined),
label: '概览',
title: '概览',
url: '/view'
title: '概览'
},
{
key: 'about',
icon: () => h(InfoCircleOutlined),
label: '关于',
title: '关于',
url: '/about'
title: '关于'
},
{
key: 'support',
icon: () => h(RedEnvelopeOutlined),
label: '支持我们',
title: '支持我们',
url: '/support'
title: '支持我们'
},
{
key: 'additional',
icon: () => h(AppstoreOutlined),
label: '附加包',
title: '附加包',
children: [
{
key: 'skyland',
icon: () => h(CloudOutlined),
label: '空岛附加',
title: '空岛附加'
}
]
}
]);
Expand All @@ -59,7 +71,12 @@ function toggleCollapsed() {
}
function select(page: any) {
router.push(page.item.url);
let path: string = '';
for (let p of page.keyPath) {
path += '/' + p
}
path = path === '/home' ? '/' : path;
router.push(path);
}
</script>

Expand Down
60 changes: 36 additions & 24 deletions src/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,45 @@
import { createRouter, createWebHashHistory, Router } from 'vue-router';
import {createRouter, createWebHashHistory, Router} from 'vue-router';
import MainPage from '../views/MainPage.vue';
import ImageViewPage from '../views/ImageViewPage.vue';
import AboutPage from '../views/AboutPage.vue';
import SupportPage from '../views/SupportPage.vue';
import SkylandPage from '../views/additional/SkylandPage.vue';

const router: Router = createRouter({
history: createWebHashHistory('/web'),
routes: [
{
path: '/',
name: 'Main',
component: MainPage
},
{
path: '/view',
name: 'Image',
component: ImageViewPage
},
{
path: '/about',
name: 'About',
component: AboutPage
},
{
path: '/support',
name: 'Support',
component: SupportPage
}
]
history: createWebHashHistory('/web'),
routes: [
{
path: '/',
name: 'Main',
component: MainPage
},
{
path: '/view',
name: 'Image',
component: ImageViewPage
},
{
path: '/about',
name: 'About',
component: AboutPage
},
{
path: '/support',
name: 'Support',
component: SupportPage
},
{
path: '/additional',
name: 'Additional',
children: [
{
path: '/additional/skyland',
name: 'Additional',
component: SkylandPage
}
]
}
]
});

export default router;
2 changes: 1 addition & 1 deletion src/views/SupportPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const qrcodes = [
<br />
<a-typography-text style="color: darkgray">请备注称呼、游戏ID和B站UID</a-typography-text>
</template>
<a-qrcode size="300" :value="qrcode.value" />
<a-qrcode :size="300" :value="qrcode.value" />
</a-card>
</div>
</template>
Expand Down
11 changes: 11 additions & 0 deletions src/views/additional/SkylandPage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<script setup lang="ts">
</script>

<template>

</template>

<style scoped>
</style>

0 comments on commit 239a3b4

Please sign in to comment.