From d5bd8e1244807b4f23b28bbf3afddc05fdeb4512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=A3=9A?= <849005670@qq.com> Date: Mon, 29 Nov 2021 21:03:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/gird/main.js | 25 +++++-- src/pages/exchangecode/add/add.js | 1 + src/pages/plan/add/add.js | 2 +- src/pages/plan/add/add.less | 7 +- src/pages/plan/add/step1.js | 12 ++-- src/pages/plan/add/step2.js | 107 ++++++++++++++++++++++++++++-- 6 files changed, 134 insertions(+), 20 deletions(-) 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 (