diff --git a/locales/en-US.json b/locales/en-US.json index d05ffa64..85c76d9c 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -7,7 +7,8 @@ "LayoutHeaderTooltipOptions": { "Reload": "Reload Current Page", "Lock": "Lock", - "Setting": "Setting" + "Setting": "Setting", + "Github": "Github" }, "LayoutHeaderSettingOptions": { "Title": "Configuration", diff --git a/locales/zh-CN.json b/locales/zh-CN.json index 2a59a9e8..b771b8ad 100644 --- a/locales/zh-CN.json +++ b/locales/zh-CN.json @@ -7,7 +7,8 @@ "LayoutHeaderTooltipOptions": { "Reload": "刷新当前页面", "Lock": "锁屏", - "Setting": "设置" + "Setting": "设置", + "Github": "Github" }, "LayoutHeaderSettingOptions": { "Title": "项目配置", diff --git a/src/icons/github.svg b/src/icons/github.svg new file mode 100644 index 00000000..77b04d19 --- /dev/null +++ b/src/icons/github.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/layout/SiderBar/index.tsx b/src/layout/SiderBar/index.tsx index 9f41482d..dec14aae 100644 --- a/src/layout/SiderBar/index.tsx +++ b/src/layout/SiderBar/index.tsx @@ -38,11 +38,11 @@ const SiderBar = defineComponent({ handleSelect: (key: string | number) => updateLocale(String(key)), }, }, - // { - // name: 'lock', - // size: 18, - // tooltip: 'LayoutHeaderTooltipOptions.Lock', - // }, + { + name: 'github', + size: 18, + tooltip: 'LayoutHeaderTooltipOptions.Github', + }, { name: 'setting', size: 18, @@ -55,10 +55,12 @@ const SiderBar = defineComponent({ setTimeout(() => changeReloadLog(true)) }, - // lock: () => {}, setting: () => { showSettings.value = true }, + github: () => { + window.open('https://github.com/XiaoDaiGua-Ray/ray-template') + }, } const handleIconClick = (key: IconEventMap) => { diff --git a/src/views/dashboard/index.scss b/src/views/dashboard/index.scss new file mode 100644 index 00000000..10428428 --- /dev/null +++ b/src/views/dashboard/index.scss @@ -0,0 +1,13 @@ +.dashboard-layout { + & .n-card { + margin-top: 18px; + + &:first-child { + margin-top: 0; + } + } + + & .dashboard-link { + text-decoration: none; + } +} diff --git a/src/views/dashboard/index.tsx b/src/views/dashboard/index.tsx index 42f76f7b..788cfec5 100644 --- a/src/views/dashboard/index.tsx +++ b/src/views/dashboard/index.tsx @@ -1,12 +1,99 @@ -import { defineComponent } from 'vue' +import './index.scss' +import { + NCard, + NLayout, + NDescriptions, + NDescriptionsItem, + NTag, + NSpace, +} from 'naive-ui' +import RayIcon from '@/components/RayIcon/index' const Dashboard = defineComponent({ name: 'Dashboard', setup() { - return {} + const coverLetterOptions = [ + { + label: '掌握搬砖框架', + des: () => ( + + Vue3.x + React + + ), + }, + { + label: '从事搬砖时长', + des: () => ( + + 练习时长两年半 + + ), + }, + { + label: '个人', + des: () => ( + + + 努力搬砖、努力摸鱼, 建设美丽家园 + + ), + span: 2, + }, + { + label: '补充说明', + des: () => ( + + 如果有希望补充的功能可以在 + + GitHub + + 提一个 Issues + + ), + span: 2, + }, + ] + + return { + coverLetterOptions, + } }, render() { - return
Dashboard
+ return ( + + + {{ + header: () => + h( + RayIcon, + { + name: 'ray', + size: '64', + }, + {}, + ), + default: () => '当你看见这个页面后, 就说明项目已经启动成功了~', + }} + + + + {this.coverLetterOptions.map((curr) => ( + + {curr.des()} + + ))} + + + + ) }, })