From 22318d2e36b8813abe258c134f6bfc1a42fbb6bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E9=98=B3?= <3311118881@qq.com> Date: Sun, 18 Aug 2024 23:08:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=B7=B2=E7=9F=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Header/DropdownComment.tsx | 2 +- src/components/Header/DropdownUser.tsx | 3 +-- src/pages/Tag/index.tsx | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/Header/DropdownComment.tsx b/src/components/Header/DropdownComment.tsx index 40c8649..600c9af 100644 --- a/src/components/Header/DropdownComment.tsx +++ b/src/components/Header/DropdownComment.tsx @@ -15,7 +15,7 @@ const DropdownMessage = () => { // 获取评论列表 const getCommentList = async () => { - const { data } = await getCommentListAPI("list") + const { data } = await getCommentListAPI({ pattern: "list" }) // 根据时间排序:最新时间在前 const sortedData = (data as Comment[]).sort((a, b) => +b.createTime - +a.createTime); setCommentList(sortedData as Comment[]) diff --git a/src/components/Header/DropdownUser.tsx b/src/components/Header/DropdownUser.tsx index cda0fac..c9fa01c 100644 --- a/src/components/Header/DropdownUser.tsx +++ b/src/components/Header/DropdownUser.tsx @@ -1,7 +1,6 @@ import { useState } from 'react'; import { Link } from 'react-router-dom'; import ClickOutside from '../ClickOutside'; -import UserOne from '../../images/user/user-01.png'; import { useUserStore } from '@/stores' @@ -20,7 +19,7 @@ const DropdownUser = () => { {store.user?.name} - {store.user?.role} + {store.role.name} diff --git a/src/pages/Tag/index.tsx b/src/pages/Tag/index.tsx index 0556e06..6b3b791 100644 --- a/src/pages/Tag/index.tsx +++ b/src/pages/Tag/index.tsx @@ -73,7 +73,7 @@ const TagPage = () => { <div className='flex justify-between mx-auto mt-2'> - <Card className="w-[40%] h-73"> + <Card className="w-[40%] h-48"> <Form form={form} layout="vertical"