|
@@ -12,14 +12,16 @@ class TemplateItems extends React.Component {
|
|
|
constructor(props) {
|
|
|
super(props);
|
|
|
this.$cont = React.createRef();
|
|
|
+ this.$search = React.createRef();
|
|
|
this.genItems = this.genItems.bind(this);
|
|
|
+ this.templateSearch = this.templateSearch.bind(this);
|
|
|
}
|
|
|
componentDidMount(){
|
|
|
- const height = getWindowInnerHeight()-206;
|
|
|
+ const height = getWindowInnerHeight()-226;
|
|
|
this.$cont.current.style.height = height+"px";
|
|
|
windowEventHandler('resize', ()=>{
|
|
|
if(this.$cont.current){
|
|
|
- const height = getWindowInnerHeight()-206;
|
|
|
+ const height = getWindowInnerHeight()-226;
|
|
|
this.$cont.current.style.height = height+"px";
|
|
|
}
|
|
|
});
|
|
@@ -49,6 +51,10 @@ class TemplateItems extends React.Component {
|
|
|
return check_circle;
|
|
|
}
|
|
|
}
|
|
|
+ templateSearch(){
|
|
|
+ const {templateSearch} = this.props
|
|
|
+ templateSearch(this.$search.current.value)
|
|
|
+ }
|
|
|
render() {
|
|
|
const { allCheckShow, handleMangerTemplate,handleClickGetMore, handleDelList, handleAllCheckbox, items,checkItems,current,hasMore } = this.props;
|
|
|
// console.log(hasMore,current,7877877)
|
|
@@ -68,6 +74,10 @@ class TemplateItems extends React.Component {
|
|
|
}
|
|
|
</div> :
|
|
|
<div className={style.wrapperTop}>
|
|
|
+ <div className={style.templateSearch}>
|
|
|
+ <input ref={this.$search} type="text" />
|
|
|
+ <div className={style.search} onClick={this.templateSearch}>检索</div>
|
|
|
+ </div>
|
|
|
<span className={`${style['fr-element']} ${style['manger']}`} onClick={handleMangerTemplate}>管理</span>
|
|
|
</div>) : <div style={{height:'36px'}}></div>
|
|
|
}
|