Explorar o código

Merge remote-tracking branch 'origin/dev/otherHis' into dev/new1

zhouna %!s(int64=6) %!d(string=hai) anos
pai
achega
805092f164

+ 1 - 1
src/components/NumberDrop/index.jsx

@@ -194,7 +194,7 @@ class NumberDrop extends Component{
       <span onFocus={this.handleNumFocus}
             onClick={allClick?null:this.handleNumClick}
             contentEditable={true}
-            style={{minWidth:'10px',display:'inline-block'}}
+            style={{minWidth:'10px',display:'inline-block',textAlign:'center'}}
             ref = {this.$span}
             onBlur={this.numInpBlur}
             onInput={this.handleSpanInp}

+ 4 - 4
src/components/NumberUnitDrop/index.jsx

@@ -41,7 +41,7 @@ class NumberUnitDrop extends Component{
     this.changeToEdit = this.changeToEdit.bind(this);
   }
   select(obj){         //选中键盘上数字事件
-    const {handleSelect,ikey,suffix,prefix,mainSaveText} = this.props;
+    const {handleSelect,ikey,suffix,prefix,mainSaveText,formulaCode} = this.props;
     this.setState({
       hasSelect:true
     });
@@ -50,7 +50,7 @@ class NumberUnitDrop extends Component{
         value:''
       });
     }
-    handleSelect&&handleSelect({ikey,text:obj.text,suffix,prefix,mainSaveText,mark:obj.mark});
+    handleSelect&&handleSelect({ikey,text:obj.text,suffix,prefix,mainSaveText,mark:obj.mark,formulaCode});
   }
   
   handleNumClick(e){ 
@@ -85,13 +85,13 @@ class NumberUnitDrop extends Component{
   //数字框失焦,保存值到store中
   numInpBlur(e){
     e.stopPropagation();
-    const {handleSelect,ikey,suffix,prefix,mainSaveText,handleLabelChange,boxMark} = this.props;
+    const {handleSelect,ikey,suffix,prefix,mainSaveText,handleLabelChange,boxMark,formulaCode} = this.props;
     const {editable} = this.state;
     if(editable){
       const text = e.target.innerText || e.target.innerHTML;
       // this.$span.current.innerText='';      //修改生成文字变成输入的2倍bug 
       // handleSelect&&handleSelect({ikey,text,suffix,prefix,mainSaveText});
-      handleLabelChange&&handleLabelChange({ikey,changeVal:text,suffix,prefix,mainSaveText,type:boxMark});
+      handleLabelChange&&handleLabelChange({ikey,changeVal:text,suffix,prefix,mainSaveText,type:boxMark,formulaCode});
       
     }
     this.setState({

+ 2 - 2
src/components/RadioInpDrop/index.jsx

@@ -182,7 +182,7 @@ class RadioInpDrop extends Component{
     return list;
   }
   render(){
-    const {data,show} = this.props;
+    const {data,show,vals,placeholder} = this.props;
     const {boxLeft,boxTop} = this.state;
     return <div className={style['container']} ref = {this.$cont}>
       <div className={this.getClass()}
@@ -191,7 +191,7 @@ class RadioInpDrop extends Component{
            onDoubleClick={this.handledbClick}
            onClick={(e)=>this.handleShow(e,true)}
            onkeydown={handleEnter}>
-        {this.parseInputDom()}
+        {vals?this.parseInputDom():<span>{placeholder}</span>}
       </div>
       <DropList onSelect={this.handleSelect} data={data} left={boxLeft} top={boxTop} show={show}/>
     </div>