浏览器无回退,取消返回按钮

This commit is contained in:
red-deng-deng 2021-12-24 14:19:35 +08:00
parent 9cd75a883e
commit 61f2240ba6
1 changed files with 3 additions and 2 deletions

View File

@ -70,6 +70,7 @@ export default class topNav extends React.Component{
let sedcbreakflag=pathnamestr.includes('plan-create');
let planbreakflag = pathnamestr.includes('mytempMould')
let editbreakflag = pathnamestr.includes('edittemplate')
let backshow=pathnamestr.includes('key-list')||pathnamestr.includes('exchange-addcommodity');
let breakchange = pathnamestr.includes('exchangecode-add')|| pathnamestr.includes('key-edit')||pathnamestr.includes('key-detail')||pathnamestr.includes('product-edit')||pathnamestr.includes('plan-edit');
if(breakchange){
breaknav=JSON.parse(sessionStorage.getItem('breakchangenav'))
@ -126,13 +127,13 @@ export default class topNav extends React.Component{
return(
<div className="nolinkmenu-row" key={key}>
{
!history0? <Pop trigger="hover" position="bottom-center" content="返回">
!history0&&!backshow? <Pop trigger="hover" position="bottom-center" content="返回">
<img onClick={()=>this.backFn(item.items)} src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/Marketing/back.svg" alt=""/>
</Pop>:null
}
<div className="nonav" style={{borderLeft:!history0?'1px solid #d1cfcf':'none'}}>
<div className="nonav" style={{borderLeft:!history0&&!backshow?'1px solid #d1cfcf':'none'}}>
{
item.items.map((item2,key2)=>{
return(