From 4f0b3cef7182adc107d5175bb6a203a55710be2c Mon Sep 17 00:00:00 2001 From: xingyu Date: Fri, 22 Jul 2022 14:27:23 +0800 Subject: [PATCH] style: vue3 index --- yudao-ui-admin-vue3/src/views/Home/Index.vue | 30 ++++++++++++++------ yudao-ui-admin-vue3/src/views/Home/types.ts | 4 ++- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/yudao-ui-admin-vue3/src/views/Home/Index.vue b/yudao-ui-admin-vue3/src/views/Home/Index.vue index ff230d1e9..695e73c23 100644 --- a/yudao-ui-admin-vue3/src/views/Home/Index.vue +++ b/yudao-ui-admin-vue3/src/views/Home/Index.vue @@ -90,16 +90,28 @@ let notice = reactive([]) const getNotice = async () => { const data = [ { - keys: ['workplace.push', 'Github'], - time: new Date() + title: '系统升级版本', + type: '通知', + keys: ['通知', '升级'], + date: new Date() }, { - keys: ['workplace.push', 'Github'], - time: new Date() + title: '系统凌晨维护', + type: '公告', + keys: ['公告', '维护'], + date: new Date() }, { - keys: ['workplace.push', 'Github'], - time: new Date() + title: '系统升级版本', + type: '通知', + keys: ['通知', '升级'], + date: new Date() + }, + { + title: '系统凌晨维护', + type: '公告', + keys: ['公告', '维护'], + date: new Date() } ] notice = Object.assign(notice, data) @@ -413,7 +425,7 @@ getAllApi() - +
@@ -438,11 +450,11 @@ getAllApi()
- {{ username }} {{ t('workplace.pushCode') }} + {{ item.type }} : {{ item.title }}
- {{ formatTime(item.time, 'yyyy-MM-dd') }} + {{ formatTime(item.date, 'yyyy-MM-dd') }}
diff --git a/yudao-ui-admin-vue3/src/views/Home/types.ts b/yudao-ui-admin-vue3/src/views/Home/types.ts index c4eff1345..e6313d36c 100644 --- a/yudao-ui-admin-vue3/src/views/Home/types.ts +++ b/yudao-ui-admin-vue3/src/views/Home/types.ts @@ -13,8 +13,10 @@ export type Project = { } export type Notice = { + title: string + type: string keys: string[] - time: Date | number | string + date: Date | number | string } export type Shortcut = {