Skip to content

Commit

Permalink
添加删除按钮
Browse files Browse the repository at this point in the history
  • Loading branch information
kklldog committed Apr 5, 2022
1 parent 69ca50b commit a757a8e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.linkDanger {
color: #ff4d4f;
}
16 changes: 13 additions & 3 deletions AgileConfig.Server.UI/react-ui-antd/src/pages/Services/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import React, { useRef, useState } from 'react';
import { getIntl, getLocale } from 'umi';
import { ServiceItem } from './data';
import { addService, queryService } from './service';
import styles from './index.less';

const handleAdd = async (fields: ServiceItem) => {
const intl = getIntl(getLocale());
Expand Down Expand Up @@ -99,15 +100,24 @@ const services: React.FC = () => {
dataIndex: 'alive',
valueEnum: {
0: {
text: '离线',
text: '异常',
status: 'Default'
},
1: {
text: '在线',
status: 'Processing'
text: '健康',
status: 'Success'
}
},
width: 120
},
{
title: '操作',
valueType: 'option',
render: (text, record, _, action) => [
<a className={styles.linkDanger}>
删除
</a>
]
}
];
return (
Expand Down

0 comments on commit a757a8e

Please sign in to comment.