diff --git a/src/components/gird/main.js b/src/components/gird/main.js index abf24ea1..e05239f2 100644 --- a/src/components/gird/main.js +++ b/src/components/gird/main.js @@ -1,4 +1,5 @@ import React from 'react' +import ReactDom from 'react-dom'; import "./main.css" import { Icon, @@ -160,7 +161,9 @@ export default class menu extends React.Component { } + componentDidMount() { + } //多选 AllCheckChange = (e) => { @@ -257,10 +260,14 @@ export default class menu extends React.Component { } componentWillReceiveProps(nextProps) { - this.setState({tableData: nextProps.tableData}); + + if(this.state.tableData != nextProps.tableData) + { + console.log("") + this.setState({tableData: nextProps.tableData}); this.setState({page: nextProps.page}); - - this.setState( {dataCount:nextProps.dataCount}) + this.setState( {dataCount:nextProps.dataCount}) + } } onConfirm = () => { @@ -325,8 +332,14 @@ export default class menu extends React.Component { } = this.props; var column_width = 0; - const auto_column_width = this.state.Column.length > 12 ? "100px" : 100 / (this.state.Column.length - 2) + "%"; - return (