import React from 'react';
import styles from '../../styles/views/Service.less';
class ServiceConfiguration extends React.Component {
constructor(props) {
super(props);
this.state = {
value: '',
};
}
columns = [
{
title: this.props.profile.ServiceConfigurationLang.ServiceConfigurationColumns[0],
key: 'serviceName',
dataIndex: 'serviceName'
}
];
render() {
return (
<div className={classNames('margin-horizontal', styles.configuration)}>
<Table
pagination={false}
columns={this.columns}
rowKey="id"
/>
</div>
);
}
}
如上面代码,其中的columns是个什么东西,怎么能够直接使用??他是一个全局变量嘛???能不能获取到他的props,如何在columns里边获取上一组件传递下来的props????