From b6d35a88dbdbc237f53ef19c8b80f4842c51c903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B7=B3?= <454313500@qq.com> Date: Sat, 27 Jan 2024 10:55:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E9=99=90=E5=88=B6=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/ArticleContentInfo.vue | 2 +- Yi.Bbs.Vue3/src/components/AvatarInfo.vue | 33 ++++-------------- .../src/components/UserInfoCard/index.vue | 23 ++----------- Yi.Bbs.Vue3/src/components/UserLimitTag.vue | 31 +++++++++++++++++ .../src/components/yi-table/TableColumn.vue | 1 - .../home/components/PointsRanking/index.vue | 32 +++-------------- .../home/components/RecommendFriend/index.vue | 34 ++++--------------- Yi.Bbs.Vue3/src/views/profile/Index.vue | 5 ++- 8 files changed, 53 insertions(+), 108 deletions(-) create mode 100644 Yi.Bbs.Vue3/src/components/UserLimitTag.vue diff --git a/Yi.Bbs.Vue3/src/components/ArticleContentInfo.vue b/Yi.Bbs.Vue3/src/components/ArticleContentInfo.vue index f9342a0b..2dd7ab06 100644 --- a/Yi.Bbs.Vue3/src/components/ArticleContentInfo.vue +++ b/Yi.Bbs.Vue3/src/components/ArticleContentInfo.vue @@ -37,7 +37,7 @@ watch(props,(n,o)=>{ ); //需要注意代码块样式 outputHtml.value = marked(n.code).replace(/
/g, "
")
-})
+},{immediate:true,deep:true})
 
 
 
diff --git a/Yi.Bbs.Vue3/src/components/AvatarInfo.vue b/Yi.Bbs.Vue3/src/components/AvatarInfo.vue
index 2eeeb495..de44fa09 100644
--- a/Yi.Bbs.Vue3/src/components/AvatarInfo.vue
+++ b/Yi.Bbs.Vue3/src/components/AvatarInfo.vue
@@ -17,13 +17,9 @@
               >
             
             
- - {{ getStatusInfo(userInfo.userLimit)?.label }} - + + +
{{ props.time }}
@@ -52,6 +48,8 @@ import { reactive, watch, onMounted, computed, ref } from "vue"; import { upload } from "@/apis/fileApi"; import useAuths from "@/hooks/useAuths"; import UserInfoCard from "./UserInfoCard/index.vue"; +import UserLimitTag from "./UserLimitTag.vue"; + const { getToken } = useAuths(); const isHasToken = getToken(); @@ -128,27 +126,8 @@ const Init = () => { } }; -const statusTypeList = [ - { - label: "正常", - value: "Normal", - type: "success", - }, - { - label: "危险", - value: "Dangerous", - type: "warning", - }, - { - label: "已禁止", - value: "Ban", - type: "danger", - }, -]; -const getStatusInfo = (type) => { - return statusTypeList.filter((item) => item.value === type)[0]; -}; +