Browse Source

文本模式ie8onInput存值,搜索下拉项样式

zhouna 6 năm trước cách đây
mục cha
commit
b286d0a89d

+ 1 - 1
src/common/components/Textarea/index.jsx

@@ -87,7 +87,7 @@ class Textarea extends Component {
       this.$dom.current.innerText = value||'';
     }
     if(isIE()){
-      $(this.$span.current).onIe8Input(function(e){
+      $(this.$dom.current).onIe8Input(function(e){
         this.handleInput(e)
       },this);
     }

+ 3 - 1
src/components/SearchDrop/index.jsx

@@ -52,10 +52,12 @@ class SearchDrop extends Component{
     // onShow&&onShow(e,false);
   }
   render(){
+    let litext = '';
     return <div className={this.getClass()} contenteditable="false" id="searchBox" style={this.getStyle()}>
       <ul>
         {this.props.data&&this.props.data.map((it)=>{
-          return <li onClick={(e)=>this.handleSelect(e,it)}>{it.showType==1?it.name:it.name+'('+it.retrievalName+')'}</li>
+          litext = it.showType==1?it.name:it.name+'('+it.retrievalName+')';
+          return <li onClick={(e)=>this.handleSelect(e,it)} title={litext}>{litext}</li>
         })}
       </ul>
     </div>

+ 2 - 0
src/components/SearchDrop/index.less

@@ -9,6 +9,8 @@
     border:1px #fff solid;
     padding: 0 20px 0 30px;
     white-space: nowrap;
+    text-overflow: ellipsis;
+    overflow: hidden;
     cursor: pointer;
   }
   li:hover{