Commit 4f0b3cef7182adc107d5175bb6a203a55710be2c

Authored by xingyu
1 parent 09526966

style: vue3 index

yudao-ui-admin-vue3/src/views/Home/Index.vue
... ... @@ -90,16 +90,28 @@ let notice = reactive<Notice[]>([])
90 90 const getNotice = async () => {
91 91 const data = [
92 92 {
93   - keys: ['workplace.push', 'Github'],
94   - time: new Date()
  93 + title: '系统升级版本',
  94 + type: '通知',
  95 + keys: ['通知', '升级'],
  96 + date: new Date()
95 97 },
96 98 {
97   - keys: ['workplace.push', 'Github'],
98   - time: new Date()
  99 + title: '系统凌晨维护',
  100 + type: '公告',
  101 + keys: ['公告', '维护'],
  102 + date: new Date()
99 103 },
100 104 {
101   - keys: ['workplace.push', 'Github'],
102   - time: new Date()
  105 + title: '系统升级版本',
  106 + type: '通知',
  107 + keys: ['通知', '升级'],
  108 + date: new Date()
  109 + },
  110 + {
  111 + title: '系统凌晨维护',
  112 + type: '公告',
  113 + keys: ['公告', '维护'],
  114 + date: new Date()
103 115 }
104 116 ]
105 117 notice = Object.assign(notice, data)
... ... @@ -413,7 +425,7 @@ getAllApi()
413 425 </template>
414 426 <el-skeleton :loading="loading" animated>
415 427 <el-row>
416   - <el-col v-for="item in shortcut" :key="`team-${item.name}`" :span="12" class="mb-20px">
  428 + <el-col v-for="item in shortcut" :key="`team-${item.name}`" :span="8" class="mb-20px">
417 429 <div class="flex items-center">
418 430 <Icon :icon="item.icon" class="mr-10px" />
419 431 <el-link type="default" :underline="false" :href="item.url">
... ... @@ -438,11 +450,11 @@ getAllApi()
438 450 <div>
439 451 <div class="text-14px">
440 452 <Highlight :keys="item.keys.map((v) => t(v))">
441   - {{ username }} {{ t('workplace.pushCode') }}
  453 + {{ item.type }} : {{ item.title }}
442 454 </Highlight>
443 455 </div>
444 456 <div class="mt-15px text-12px text-gray-400">
445   - {{ formatTime(item.time, 'yyyy-MM-dd') }}
  457 + {{ formatTime(item.date, 'yyyy-MM-dd') }}
446 458 </div>
447 459 </div>
448 460 </div>
... ...
yudao-ui-admin-vue3/src/views/Home/types.ts
... ... @@ -13,8 +13,10 @@ export type Project = {
13 13 }
14 14  
15 15 export type Notice = {
  16 + title: string
  17 + type: string
16 18 keys: string[]
17   - time: Date | number | string
  19 + date: Date | number | string
18 20 }
19 21  
20 22 export type Shortcut = {
... ...