修改了一些小问题
This commit is contained in:
parent
8feb94d09b
commit
a9d5edaf8a
|
|
@ -36,31 +36,6 @@ const Comment = (
|
|||
setNewCommentText('');
|
||||
};
|
||||
|
||||
const MyButton = () => {
|
||||
const clickPeople = features.token.getUserId();
|
||||
|
||||
const handleClick = () => {
|
||||
if (!clickPeople) {
|
||||
return;
|
||||
}
|
||||
|
||||
setLikePeople((prevLikePeople) => {
|
||||
if (prevLikePeople.includes(clickPeople)) {
|
||||
return prevLikePeople.filter(person => person !== clickPeople);
|
||||
} else {
|
||||
return [...prevLikePeople, clickPeople];
|
||||
}
|
||||
});
|
||||
};
|
||||
const count = likePeople.length;
|
||||
|
||||
return (
|
||||
<Button onClick={handleClick}>
|
||||
{t('common::like')} ({count})
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={Styles.content}>
|
||||
|
|
@ -90,7 +65,6 @@ const Comment = (
|
|||
<Button
|
||||
onClick={handleSubmit}
|
||||
> {t('common::submit')} </Button>
|
||||
<MyButton />
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ const menus: IMenu[] = [
|
|||
name: 'consoleHome',
|
||||
icon: 'workbench',
|
||||
url: '/home',
|
||||
destEntity: 'userRelation',
|
||||
destEntity: '',
|
||||
order: 0,
|
||||
actions: ['select'],
|
||||
},
|
||||
|
|
@ -47,7 +47,7 @@ const menus: IMenu[] = [
|
|||
icon: 'addpeople',
|
||||
url: '/userRelation/manage',
|
||||
parent: 'System',
|
||||
destEntity: 'userRelation',
|
||||
destEntity: '',
|
||||
actions: ['select'],
|
||||
},
|
||||
{
|
||||
|
|
@ -62,7 +62,7 @@ const menus: IMenu[] = [
|
|||
name: 'categoryManage',
|
||||
icon: 'stealth',
|
||||
url: '/category/list',
|
||||
destEntity: 'userRelation',
|
||||
destEntity: '',
|
||||
order: 2,
|
||||
actions: ['select'],
|
||||
},
|
||||
|
|
@ -70,7 +70,7 @@ const menus: IMenu[] = [
|
|||
name: 'essayManage',
|
||||
icon: 'barrage',
|
||||
url: '/essay/list',
|
||||
destEntity: 'userRelation',
|
||||
destEntity: '',
|
||||
order: 3,
|
||||
actions: ['select'],
|
||||
},
|
||||
|
|
@ -79,7 +79,7 @@ const menus: IMenu[] = [
|
|||
name: 'labelManage',
|
||||
icon: 'accessory',
|
||||
url: '/label/list',
|
||||
destEntity: 'userRelation',
|
||||
destEntity: '',
|
||||
order: 4,
|
||||
actions: ['select'],
|
||||
},
|
||||
|
|
@ -88,7 +88,7 @@ const menus: IMenu[] = [
|
|||
name: 'commentManage',
|
||||
icon: 'message',
|
||||
url: '/comment/list',
|
||||
destEntity: 'userRelation',
|
||||
destEntity: '',
|
||||
order: 5,
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"pageTitle": "评论管理",
|
||||
"content": "",
|
||||
"creator": "",
|
||||
"essay": ""
|
||||
"content": "内容",
|
||||
"creator": "创建者",
|
||||
"essay": "文章"
|
||||
}
|
||||
|
|
@ -94,7 +94,6 @@ const EssayDetails = (
|
|||
<button
|
||||
className={Styles.scrollTopButton}
|
||||
onClick={scrollToTop}
|
||||
title="Scroll to top"
|
||||
>
|
||||
<VerticalAlignTopOutlined />
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Reference in New Issue