From e12c56e352b114b4b7fa3cbd2e92aef89cfd68ef 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 (#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 0a99fe91..8e1eadc1 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 ede68883..65bf0883 100644 --- a/src/views/sheet/components/CustomSheetList.vue +++ b/src/views/sheet/components/CustomSheetList.vue @@ -3,104 +3,115 @@ - - - - - + - + - + - +