From 9ee10b02a18e66eb7d0761b101c2848c59ad2bc6 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Mon, 21 Feb 2022 14:03:04 +0800 Subject: [PATCH] refactor: custom sheet list component code optimization (halo-dev/console#446) Signed-off-by: Ryan Wang --- src/core/constant.js | 18 ++ .../sheet/components/CustomSheetList.vue | 239 +++++++++--------- 2 files changed, 132 insertions(+), 125 deletions(-) diff --git a/src/core/constant.js b/src/core/constant.js index 0a99fe91a..8e1eadc1a 100644 --- a/src/core/constant.js +++ b/src/core/constant.js @@ -122,3 +122,21 @@ export const postStatuses = { text: '私密' } } + +export const sheetStatuses = { + PUBLISHED: { + color: 'green', + status: 'success', + text: '已发布' + }, + DRAFT: { + color: 'yellow', + status: 'warning', + text: '草稿' + }, + RECYCLE: { + color: 'red', + status: 'error', + text: '回收站' + } +} diff --git a/src/views/sheet/components/CustomSheetList.vue b/src/views/sheet/components/CustomSheetList.vue index ede688838..65bf0883b 100644 --- a/src/views/sheet/components/CustomSheetList.vue +++ b/src/views/sheet/components/CustomSheetList.vue @@ -3,104 +3,115 @@ - - - - - + - + - + - +