This commit is contained in:
姜棚 2021-12-10 13:57:12 +08:00
parent 9a7b730e4c
commit a43e84ab65
2 changed files with 30 additions and 3 deletions

View File

@ -161,13 +161,40 @@ export default class menu extends React.Component {
}
scrollFunc = function (e) {
e = e || window.event;
if (e.wheelDelta) { //判断浏览器IE谷歌滑轮事件
if (e.wheelDelta > 0) { //当滑轮向上滚动时
}
if (e.wheelDelta < 0) { //当滑轮向下滚动时
}
} else if (e.detail) { //Firefox滑轮事件
if (e.detail> 0) { //当滑轮向下滚动时
}
if (e.detail< 0) { //当滑轮向上滚动时
}
}
}
componentDidMount() {
const dom = ReactDom.findDOMNode(this);
if(dom.attachEvent){
dom.attachEvent('onmousewheel',this.scrollFunc);
}
//Firefox使用addEventListener添加滚轮事件
if (dom.addEventListener) {//firefox
dom.addEventListener('DOMMouseScroll', this.scrollFunc, false);
}
//Safari与Chrome属于同一类型
dom.onmousewheel = this.scrollFunc;
}
//多选

View File

@ -515,7 +515,7 @@ componentDidUpdate(prevProps,prevState){
<Button type="default" icon="download" onClick={this.exportFn.bind(this)}>导出订单</Button>
</p>
<div className="dfleac">
<Select width="180px" value={this.state.option} onChange={(e)=>this.optiononChange(e)} options={options} clearable placeholder="选择一项查询项" />
<Select width="180px" value={this.state.option} onChange={(e)=>this.optiononChange(e)} options={options} clearable placeholder="请输入关键字查询" />
{/* <Button type="info">批量操作</Button> */}
{
this.state.option?this.state.option.key=='1'? <Ipt labelWidth={0} onClearItem={(e)=>{this.setState({key_word:''})}} wordSearch={this.sureFn.bind(this)} onChange={(e)=>this.setState({key_word:e})} value={this.state.key_word} icon="search" placeholder={"请输入key进行搜索"} countShow={false} height={'36px'} width={'260px'} alignment={'left'}/>: