This commit is contained in:
PC-202306242200\Administrator
2024-09-12 20:37:18 +08:00
parent caf84f4ff3
commit bc339aec84
8 changed files with 91 additions and 100 deletions

View File

@@ -36,7 +36,7 @@ const handleAdd = async (fields) => {
* @param fields
*/
const handleUpdate = async (fields) => {
fields.status = fields.status ? 1 : 0
fields.status = fields.status ? 0 : 1
const hide = message.loading('正在修改');
try {
@@ -111,7 +111,7 @@ const MenuTableList: React.FC = () => {
valueType: 'text',
search: false,
render: (_, record) => {
return <Image src={record.imageUrl} width={60} height={60}></Image>
return <Image src={record.imageUrl} width={60} height={60}></Image>
}
},
{
@@ -144,6 +144,12 @@ const MenuTableList: React.FC = () => {
hidden={!access.hasPerms('admin/banner/update')}
onClick={() => {
setModalVisible(true);
let data = JSON.parse(JSON.stringify(record))
if (data.status == 0) {
data.status = true
}else{
data.status = false
}
setCurrentRow(record);
}}
>