feat(frontend): 添加关于软件页面

- 在 App.vue 中添加关于软件的菜单项
- 在 router.js 中添加关于软件的路由- 新增 about.vue 组件,包含软件介绍和作者信息
This commit is contained in:
spark 2025-02-08 12:20:40 +08:00
parent cb28b18541
commit 1035f2a800
3 changed files with 47 additions and 0 deletions

View File

@ -102,6 +102,23 @@ const menuOptions = ref([
key: 'exit',
icon: renderIcon(PowerOutline),
},
{
label: () =>
h(
RouterLink,
{
to: {
name: 'about',
params: {
id: 'zh-CN'
}
}
},
{ default: () => '关于软件' }
),
key: 'about',
icon: renderIcon(StarOutline),
},
])
function renderIcon(icon) {
return () => h(NIcon, null, { default: () => h(icon) })

View File

@ -0,0 +1,28 @@
<script setup>
</script>
<template>
<n-flex justify="center" style="margin-top: 12px;padding-left: 12px;height: 100%">
<n-card size="large">
<h1>go-stock</h1>
<n-image size="large" src="https://raw.githubusercontent.com/ArvinLovegood/go-stock/master/build/appicon.png" />
<p>自选股行情实时监控基于Wails和NaiveUI构建的AI赋能股票分析工具</p>
<p>
欢迎点赞GitHub<a href="https://github.com/ArvinLovegood/go-stock" target="_blank">go-stock</a>
</p>
</n-card>
<n-card size="large">
<h1>关于作者</h1>
<n-image size="large" src="https://avatars.githubusercontent.com/u/7401917?v=4" />
<h1><a href="https://github.com/ArvinLovegood" target="_blank">@ArvinLovegood</a></h1>
<p>一个热爱编程的小白欢迎关注我的Github</p>
</n-card>
</n-flex>
</template>
<style scoped>
</style>

View File

@ -2,10 +2,12 @@ import { createMemoryHistory, createRouter } from 'vue-router'
import stockView from '../components/stock.vue'
import settingsView from '../components/settings.vue'
import about from "../components/about.vue";
const routes = [
{ path: '/', component: stockView,name: 'stock' },
{ path: '/settings/:id', component: settingsView,name: 'settings' },
{ path: '/about', component: about,name: 'about' },
]
const router = createRouter({