Commit db32d9e6 by zhanghaozhe

国际手机号

parent 6420830c
...@@ -1050,11 +1050,18 @@ class Country extends Component { ...@@ -1050,11 +1050,18 @@ class Country extends Component {
return ''; return '';
}); });
lens.map((item,index) => { lens.map((item,index) => {
if(item && top >= item) {
this.setState({
currentNav: data[index]['type']
})
}
/*
if(item && (top + 200) > item) { if(item && (top + 200) > item) {
this.setState({ this.setState({
currentNav: data[index]['type'] currentNav: data[index]['type']
}) })
} }
*/
}); });
} }
...@@ -1075,9 +1082,12 @@ class Country extends Component { ...@@ -1075,9 +1082,12 @@ class Country extends Component {
this.setState({ this.setState({
currentNav: param currentNav: param
}); });
window.scrollTo({left: 0, top: el.offsetTop, behavior: 'smooth'})
/*
el.scrollIntoView({ el.scrollIntoView({
behavior: 'smooth' behavior: 'smooth'
}); });
*/
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment