陈帅
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
12 additions and
2 deletions
-
package.json
-
src/pages/ListTableList/index.tsx
|
|
|
@ -60,7 +60,7 @@ |
|
|
|
"dependencies": { |
|
|
|
"@ant-design/icons": "^4.0.0", |
|
|
|
"@ant-design/pro-layout": "^5.0.8", |
|
|
|
"@ant-design/pro-table": "^2.1.11", |
|
|
|
"@ant-design/pro-table": "^2.2.0", |
|
|
|
"antd": "^4.0.0", |
|
|
|
"classnames": "^2.2.6", |
|
|
|
"lodash": "^4.17.11", |
|
|
|
|
|
|
|
@ -1,5 +1,5 @@ |
|
|
|
import { DownOutlined, PlusOutlined } from '@ant-design/icons'; |
|
|
|
import { Button, Divider, Dropdown, Menu, message } from 'antd'; |
|
|
|
import { Button, Divider, Dropdown, Menu, message, Input } from 'antd'; |
|
|
|
import React, { useState, useRef } from 'react'; |
|
|
|
import { PageHeaderWrapper } from '@ant-design/pro-layout'; |
|
|
|
import ProTable, { ProColumns, ActionType } from '@ant-design/pro-table'; |
|
|
|
@ -118,6 +118,16 @@ const TableList: React.FC<{}> = () => { |
|
|
|
sorter: true, |
|
|
|
valueType: 'dateTime', |
|
|
|
hideInForm: true, |
|
|
|
renderFormItem: (item, { defaultRender, ...rest }, form) => { |
|
|
|
const status = form.getFieldValue('status'); |
|
|
|
if (`${status}` === '0') { |
|
|
|
return false; |
|
|
|
} |
|
|
|
if (`${status}` === '3') { |
|
|
|
return <Input {...rest} placeholder="请输入异常原因!" />; |
|
|
|
} |
|
|
|
return defaultRender(item); |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '操作', |
|
|
|
|