Преглед изворни кода

主诉现病史change方法命名修改

zhouna пре 5 година
родитељ
комит
c57edda233

+ 3 - 3
src/common/components/ItemBox/index.jsx

@@ -33,9 +33,9 @@ class ItemBox extends Component {
     handleClick && handleClick(e);//为了获取鼠标位置,显示搜索结果框;
   }
   handleInput(e){
-    const {onchange,data} = this.props;
+    const {handleChange,data} = this.props;
     if(!data || (data.length==0)){//避免结构化下触发onchange,导致下拉要点两下
-      onchange&&onchange(e)
+      handleChange&&handleChange(e)
     }
   }
 
@@ -58,7 +58,7 @@ componentWillReceiveProps(nextP){
     }
 }
   render(){
-    const {title,children,editable,className,handleFocus,onchange,fuzhen,border,handleBlur,titleTop,backgroundColor,boxId} = this.props;
+    const {title,children,editable,className,handleFocus,fuzhen,border,handleBlur,titleTop,backgroundColor,boxId} = this.props;
     return <div className={style["box"]+" "+"clearfix"} >
       <div className={style["title"] + ' '+(className||'')} style={{marginTop:titleTop?'22px':''}}>{title}</div>
       <div ref={this.$div} className={`${style["content"]} ${border?style["border"]:''} ${backgroundColor?style["noBorder"]:''}`} contentEditable={editable} style={this.getBoxStyle()} onFocus={handleFocus} onInput={this.handleInput} onClick={(e)=>{this.handleClick(e);}} onBlur={handleBlur} id={boxId} onkeydown={handleEnter}>

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

@@ -142,8 +142,8 @@ class CurrentIll extends Component{
     return  <div className={style['current-ill']}>
       <ItemBox title='现病史' 
       editable={editClear||data.length==0?true:false} 
-      handleFocus={this.handleFocus} 
-      onchange={forbidInput?this.onchange:''} 
+      handleFocus={this.handleFocus}
+      handleChange={forbidInput?this.onchange:''}
       handleClick={this.handleClick}
       handleBlur={this.handleBlur}>
         {data.length>0?this.getInlineTag():(saveText[0]?saveText[0]:'')}

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

@@ -288,8 +288,8 @@ class MainSuit extends Component{
       title='主诉' 
       editable={editClear||datas.length==0?true:false} 
       boxLineHeight="24px"
-      handleFocus={this.handleFocus} 
-      onchange={this.handleChange} 
+      handleFocus={this.handleFocus}
+      handleChange={this.handleChange}
       handleClick={this.handleClick} 
       handleBlur={this.handleBlur}
       data={datas}