1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/rainbond-rainbond-ui

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
index.js 2 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
songyg Отправлено 3 лет назад e802d19
import React, { Component } from 'react';
import { formatMessage, FormattedMessage } from 'umi-plugin-locale';
import { connect } from 'dva';
import { Table, Button, Modal } from 'antd';
const confirm = Modal.confirm;
@connect(({ }) => ({}))
class UserTable extends Component {
onCancel=()=>{
const {onCancel} = this.props
onCancel&&onCancel()
}
rowKey = (record, index) => index
render() {
const columns = [
{
title: formatMessage({id:'popover.tcp.config.table.attr_name'}),
dataIndex: 'attr_name',
key: "attr_name",
align: 'center',
},
{
title: formatMessage({id:'popover.tcp.config.table.attr_value'}),
dataIndex: 'attr_value',
key: "attr_value",
align: 'center',
},
{
title: formatMessage({id:'popover.tcp.config.table.name'}),
dataIndex: 'name',
key: "name",
align: 'center',
},
];
const { dataSource} = this.props;
const dataList = dataSource.filter((item)=>{
return (!item.attr_name.endsWith("_HOST")&&!item.attr_name.endsWith("_PORT")) ;
})
const footer = [<Button key="back" onClick={this.onCancel}>{formatMessage({id:'button.close'})}</Button>]
return (
<div>
<Modal
title={formatMessage({id:'popover.tcp.config.title'})}
visible={this.props.visible}
footer={footer}
onCancel={this.onCancel}
>
<Table
rowKey={this.rowKey}
bordered
columns={columns}
pagination={false}
dataSource={dataList}
/>
</Modal>
</div>
);
}
}
export default UserTable;

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://gitlife.ru/oschina-mirror/rainbond-rainbond-ui.git
git@gitlife.ru:oschina-mirror/rainbond-rainbond-ui.git
oschina-mirror
rainbond-rainbond-ui
rainbond-rainbond-ui
main