mirror of
https://github.com/fumiama/paper-manager.git
synced 2026-06-13 05:03:16 +08:00
add filelist
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<Card title="项目" v-bind="$attrs">
|
||||
<template #extra>
|
||||
<a-button type="link" size="small">更多</a-button>
|
||||
<a-button type="link" size="small" @click="nav2filelist">更多</a-button>
|
||||
</template>
|
||||
|
||||
<CardGrid v-for="item in items" :key="item" class="!md:w-1/3 !w-full">
|
||||
<CardGrid v-for="item in items" :key="item.title" class="!md:w-1/3 !w-full">
|
||||
<span class="flex">
|
||||
<Icon :icon="item.icon" :color="item.color" size="30" />
|
||||
<span class="text-lg ml-4">{{ item.title }}</span>
|
||||
@@ -21,12 +21,24 @@
|
||||
import { defineComponent } from 'vue'
|
||||
import { Card } from 'ant-design-vue'
|
||||
import { Icon } from '/@/components/Icon'
|
||||
import { groupItems } from './data'
|
||||
import { getFileList } from '/@/api/page/page'
|
||||
import { router } from '/@/router'
|
||||
import { PageEnum } from '/@/enums/pageEnum'
|
||||
|
||||
async function nav2filelist() {
|
||||
router.push(PageEnum.PAGE_FILELIST)
|
||||
}
|
||||
|
||||
const fl = await getFileList(6)
|
||||
|
||||
for (let i = 0; i < fl.length; i++) {
|
||||
fl[i].icon = 'ion:newspaper-outline'
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
components: { Card, CardGrid: Card.Grid, Icon },
|
||||
setup() {
|
||||
return { items: groupItems }
|
||||
return { items: fl, nav2filelist: nav2filelist }
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
interface GroupItem {
|
||||
title: string
|
||||
icon: string
|
||||
color: string
|
||||
desc: string
|
||||
date: string
|
||||
group: string
|
||||
}
|
||||
|
||||
interface NavItem {
|
||||
title: string
|
||||
icon: string
|
||||
@@ -103,54 +94,3 @@ export const dynamicInfoItems: DynamicInfoItem[] = [
|
||||
desc: `推送了代码到 <a>Github</a>`,
|
||||
},
|
||||
]
|
||||
|
||||
export const groupItems: GroupItem[] = [
|
||||
{
|
||||
title: 'Github',
|
||||
icon: 'carbon:logo-github',
|
||||
color: '',
|
||||
desc: '不要等待机会,而要创造机会。',
|
||||
group: '开源组',
|
||||
date: '2021-04-01',
|
||||
},
|
||||
{
|
||||
title: 'Vue',
|
||||
icon: 'ion:logo-vue',
|
||||
color: '#3fb27f',
|
||||
desc: '现在的你决定将来的你。',
|
||||
group: '算法组',
|
||||
date: '2021-04-01',
|
||||
},
|
||||
{
|
||||
title: 'Html5',
|
||||
icon: 'ion:logo-html5',
|
||||
color: '#e18525',
|
||||
desc: '没有什么才能比努力更重要。',
|
||||
group: '上班摸鱼',
|
||||
date: '2021-04-01',
|
||||
},
|
||||
{
|
||||
title: 'Angular',
|
||||
icon: 'ion:logo-angular',
|
||||
color: '#bf0c2c',
|
||||
desc: '热情和欲望可以突破一切难关。',
|
||||
group: 'UI',
|
||||
date: '2021-04-01',
|
||||
},
|
||||
{
|
||||
title: 'React',
|
||||
icon: 'bx:bxl-react',
|
||||
color: '#00d8ff',
|
||||
desc: '健康的身体是实目标的基石。',
|
||||
group: '技术牛',
|
||||
date: '2021-04-01',
|
||||
},
|
||||
{
|
||||
title: 'Js',
|
||||
icon: 'ion:logo-javascript',
|
||||
color: '#4daf1bc9',
|
||||
desc: '路是走出来的,而不是空想出来的。',
|
||||
group: '架构组',
|
||||
date: '2021-04-01',
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user