解决已知问题

This commit is contained in:
宇阳
2025-01-17 23:01:42 +08:00
parent 61c6a934ca
commit 07af30b649
3 changed files with 6624 additions and 8 deletions

6616
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -30,21 +30,20 @@ export default () => {
const getCommentList = async () => { const getCommentList = async () => {
try { try {
setLoading(true)
const { data } = await getCommentListAPI(); const { data } = await getCommentListAPI();
setList(data) setList(data)
setLoading(false)
} catch (error) { } catch (error) {
setLoading(false) setLoading(false)
} }
setLoading(false)
} }
useEffect(() => { useEffect(() => {
setLoading(true)
getCommentList(); getCommentList();
}, []); }, []);
const columns: ColumnsType = [ const columns: ColumnsType<Comment> = [
{ {
title: 'ID', title: 'ID',
dataIndex: 'id', dataIndex: 'id',
@@ -61,7 +60,7 @@ export default () => {
dataIndex: 'content', dataIndex: 'content',
key: 'content', key: 'content',
width: 400, width: 400,
render: (text: string, record) => <span className="hover:text-primary cursor-pointer line-clamp-2" onClick={() => { render: (text: string, record: Comment) => <span className="hover:text-primary cursor-pointer line-clamp-2" onClick={() => {
setComment(record) setComment(record)
setIsCommentModalOpen(true) setIsCommentModalOpen(true)
}}>{text}</span> }}>{text}</span>

View File

@@ -106,9 +106,10 @@ export default () => {
<div> <div>
<Title value="标签管理" /> <Title value="标签管理" />
<div className='flex md:justify-between flex-col md:flex-row mx-auto mt-2'> <div className='flex md:justify-between flex-col md:flex-row mx-auto mt-2 h-[calc(100vh-180px)]'>
<Spin spinning={editLoading}> <Spin spinning={editLoading} className='w-full md:w-[40%] '>
<Card className="w-full md:w-[40%] h-[calc(100vh-180px)]"> {/* <Card className="w-full md:w-[40%] h-46"> */}
<Card className="w-full h-46">
<Form <Form
form={form} form={form}
layout="vertical" layout="vertical"