判断web页面是否是首次加载: if(!window.name){ window.name ='name' this.setState({ note:true })} 转载于:https://www.cnblogs.com/keleyz/p/9578741.html