|
@@ -90,10 +90,39 @@ class SearchOption extends React.Component {
|
|
|
this.setState({border:false,val:''})
|
|
|
}
|
|
|
render() {
|
|
|
- const { children,visible } = this.props;
|
|
|
+ const { children,visible,searchType } = this.props;
|
|
|
const { show } = this.state;
|
|
|
+ console.log(searchType)
|
|
|
return (
|
|
|
+ searchType == 1?
|
|
|
<div id="searchOption" className={visible?`${styles.search} ${styles.show} searchOption`:`${styles.search} ${styles.hide} searchOption`}>
|
|
|
+ <img style={{display:show?'block':'none'}} className={styles.clearVal} src={clear} onClick={this.handleClearVal} alt="清空" />
|
|
|
+ <div className={styles.selectLis}>
|
|
|
+ <span>细项</span>
|
|
|
+ <ul>
|
|
|
+ <li>细项</li>
|
|
|
+ <li>套餐</li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <input
|
|
|
+ className={this.state.border ?`${styles.border}`:`${styles.borderNone}`}
|
|
|
+ type="text"
|
|
|
+ maxLength="30"
|
|
|
+ ref={this.textInput}
|
|
|
+ onFocus={this.handleFocus}
|
|
|
+ onBlur={this.handleBlur}
|
|
|
+ onInput={(e) => {
|
|
|
+ this.handleInput(e)
|
|
|
+ }}
|
|
|
+ onPropertyChange={(e) => { // 兼容ie
|
|
|
+ this.handleInput(e)
|
|
|
+ }}
|
|
|
+ placeholder="搜索"
|
|
|
+ />
|
|
|
+ <div className={styles.autoList}>
|
|
|
+ {children}
|
|
|
+ </div>
|
|
|
+ </div>:<div id="searchOption" className={visible?`${styles.search} ${styles.show} searchOption`:`${styles.search} ${styles.hide} searchOption`}>
|
|
|
<img className={styles.searchVal} src={search} alt="搜索" />
|
|
|
<img style={{display:show?'block':'none'}} className={styles.clearVal} src={clear} onClick={this.handleClearVal} alt="清空" />
|
|
|
<input
|