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,16 +90,28 @@ let notice = reactive<Notice[]>([])
90 const getNotice = async () => { 90 const getNotice = async () => {
91 const data = [ 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 notice = Object.assign(notice, data) 117 notice = Object.assign(notice, data)
@@ -413,7 +425,7 @@ getAllApi() @@ -413,7 +425,7 @@ getAllApi()
413 </template> 425 </template>
414 <el-skeleton :loading="loading" animated> 426 <el-skeleton :loading="loading" animated>
415 <el-row> 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 <div class="flex items-center"> 429 <div class="flex items-center">
418 <Icon :icon="item.icon" class="mr-10px" /> 430 <Icon :icon="item.icon" class="mr-10px" />
419 <el-link type="default" :underline="false" :href="item.url"> 431 <el-link type="default" :underline="false" :href="item.url">
@@ -438,11 +450,11 @@ getAllApi() @@ -438,11 +450,11 @@ getAllApi()
438 <div> 450 <div>
439 <div class="text-14px"> 451 <div class="text-14px">
440 <Highlight :keys="item.keys.map((v) => t(v))"> 452 <Highlight :keys="item.keys.map((v) => t(v))">
441 - {{ username }} {{ t('workplace.pushCode') }} 453 + {{ item.type }} : {{ item.title }}
442 </Highlight> 454 </Highlight>
443 </div> 455 </div>
444 <div class="mt-15px text-12px text-gray-400"> 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 </div> 458 </div>
447 </div> 459 </div>
448 </div> 460 </div>
yudao-ui-admin-vue3/src/views/Home/types.ts
@@ -13,8 +13,10 @@ export type Project = { @@ -13,8 +13,10 @@ export type Project = {
13 } 13 }
14 14
15 export type Notice = { 15 export type Notice = {
  16 + title: string
  17 + type: string
16 keys: string[] 18 keys: string[]
17 - time: Date | number | string 19 + date: Date | number | string
18 } 20 }
19 21
20 export type Shortcut = { 22 export type Shortcut = {