mirror of
https://github.com/ArvinLovegood/go-stock.git
synced 2025-07-19 00:00:09 +08:00
feat(frontend): 添加关于软件页面
- 在 App.vue 中添加关于软件的菜单项 - 在 router.js 中添加关于软件的路由- 新增 about.vue 组件,包含软件介绍和作者信息
This commit is contained in:
parent
cb28b18541
commit
1035f2a800
@ -102,6 +102,23 @@ const menuOptions = ref([
|
|||||||
key: 'exit',
|
key: 'exit',
|
||||||
icon: renderIcon(PowerOutline),
|
icon: renderIcon(PowerOutline),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: () =>
|
||||||
|
h(
|
||||||
|
RouterLink,
|
||||||
|
{
|
||||||
|
to: {
|
||||||
|
name: 'about',
|
||||||
|
params: {
|
||||||
|
id: 'zh-CN'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ default: () => '关于软件' }
|
||||||
|
),
|
||||||
|
key: 'about',
|
||||||
|
icon: renderIcon(StarOutline),
|
||||||
|
},
|
||||||
])
|
])
|
||||||
function renderIcon(icon) {
|
function renderIcon(icon) {
|
||||||
return () => h(NIcon, null, { default: () => h(icon) })
|
return () => h(NIcon, null, { default: () => h(icon) })
|
||||||
|
28
frontend/src/components/about.vue
Normal file
28
frontend/src/components/about.vue
Normal 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>
|
@ -2,10 +2,12 @@ import { createMemoryHistory, createRouter } from 'vue-router'
|
|||||||
|
|
||||||
import stockView from '../components/stock.vue'
|
import stockView from '../components/stock.vue'
|
||||||
import settingsView from '../components/settings.vue'
|
import settingsView from '../components/settings.vue'
|
||||||
|
import about from "../components/about.vue";
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{ path: '/', component: stockView,name: 'stock' },
|
{ path: '/', component: stockView,name: 'stock' },
|
||||||
{ path: '/settings/:id', component: settingsView,name: 'settings' },
|
{ path: '/settings/:id', component: settingsView,name: 'settings' },
|
||||||
|
{ path: '/about', component: about,name: 'about' },
|
||||||
]
|
]
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user