Kaynağa Gözat

增加分组的按钮

huangsn 5 yıl önce
ebeveyn
işleme
d6dd8deb0c
1 değiştirilmiş dosya ile 21 ekleme ve 0 silme
  1. 21 0
      src/pages/fengkong/features/group/index.js

+ 21 - 0
src/pages/fengkong/features/group/index.js

@@ -3,6 +3,7 @@ import { FilterTable } from 'wptpc-design'
 import { Link } from 'dva/router'
 import { thanos } from '@/conf/config'
 import { Button } from 'antd'
+import { Divider, message, Popconfirm } from 'antd'
 
 const apiUrl = `${thanos}/thanos-admin/api/v1/group/list`
 
@@ -66,6 +67,26 @@ class GroupList extends React.PureComponent {
       {
         title: '修改人',
         dataIndex: 'updateUser'
+      },
+      {
+        title: '操作',
+        dataIndex: 'actions',
+        // 所有需要弹窗操作的都可以用编辑的逻辑;所有不需要弹窗的操作,比如上架、发布等,都可以用”删除“的逻辑
+        render: (text, record) => (
+          <span>
+            <Link
+              to={{
+                pathname: './edit/' + record.name,
+                state: record
+              }}
+            >编辑</Link>
+            <Divider type="vertical"/>
+            <Popconfirm
+              title="确定删除"
+              onConfirm={() => this.delItem(record)}>
+              <a>删除</a>
+            </Popconfirm>
+          </span>)
       }
     ],
     getRefresh: refresh => {