From 81200868baea697292fdd01bd7a60aa9617b491e Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Thu, 25 Nov 2021 15:30:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=97=A0=E5=9B=9E=E6=98=BEbu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/exchangecode/edit/edit.js | 40 ++++++++++++++++------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/src/pages/exchangecode/edit/edit.js b/src/pages/exchangecode/edit/edit.js index b0b5a9d1..1105ce0a 100644 --- a/src/pages/exchangecode/edit/edit.js +++ b/src/pages/exchangecode/edit/edit.js @@ -35,7 +35,8 @@ export default class exchangedit extends React.Component{ describe:'', date_time:"", range:"" - }, + }, + isload:false, tempdata:[], cur_product:null, productOption:[], @@ -66,6 +67,7 @@ export default class exchangedit extends React.Component{ } this.setState({codeInfo:codeInfo}) + this.setState({isload:true}); console.log("当前的商品信息66") @@ -401,29 +403,31 @@ export default class exchangedit extends React.Component{ width:'auto', }, ]; - return(

- - { - let model = this.state.codeInfo; - model.code_name = e; - this.setState({codeInfo:model}) - }} - - onClearItem={(e)=>{ - let model = this.state.codeInfo; - model.code_name = ""; - this.setState({codeInfo:model}) - }} - - - value={this.state.codeInfo.code_name} placeholder={"请输入兑换码名称"} labelWidth={'0px'} maxLength={10} height={'36px'} width={'520px'} alignment={'left'}/> - + { + this.state.isload? + { + let model = this.state.codeInfo; + model.code_name = e; + this.setState({codeInfo:model}) + }} + + onClearItem={(e)=>{ + let model = this.state.codeInfo; + model.code_name = ""; + this.setState({codeInfo:model}) + }} + + + value={this.state.codeInfo.code_name} placeholder={"请输入兑换码名称"} labelWidth={'0px'} maxLength={10} height={'36px'} width={'520px'} alignment={'left'}/> + :null + } + { let model= this.state.codeInfo;