2022-11-23 15:01:18 +08:00

101 lines
2.3 KiB
TypeScript

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() {
const coverLetterOptions = [
{
label: '掌握搬砖框架',
des: () => (
<NSpace>
<NTag type="success">Vue3.x</NTag>
<NTag type="info">React</NTag>
</NSpace>
),
},
{
label: '从事搬砖时长',
des: () => (
<NSpace>
<NTag type="success"></NTag>
</NSpace>
),
},
{
label: '个人',
des: () => (
<NSpace align="center">
<RayIcon name="ray" size="22" />
,
</NSpace>
),
span: 2,
},
{
label: '补充说明',
des: () => (
<NSpace align="center">
<a
class="dashboard-link"
href="https://github.com/XiaoDaiGua-Ray/ray-template"
>
GitHub
</a>
Issues
</NSpace>
),
span: 2,
},
]
return {
coverLetterOptions,
}
},
render() {
return (
<NLayout class="dashboard-layout layout-full">
<NCard>
{{
header: () =>
h(
RayIcon,
{
name: 'ray',
size: '64',
},
{},
),
default: () => '当你看见这个页面后, 就说明项目已经启动成功了~',
}}
</NCard>
<NCard title="个人介绍">
<NDescriptions bordered labelPlacement="left" column={2}>
{this.coverLetterOptions.map((curr) => (
<NDescriptionsItem
key={curr.label}
label={curr.label}
span={curr?.span}
>
{curr.des()}
</NDescriptionsItem>
))}
</NDescriptions>
</NCard>
</NLayout>
)
},
})
export default Dashboard