vue 界面关闭触发事件 ---实例销毁之前调用 beforeDestroy(){ //就是这个界面关闭的时候会触发这个,在这里写你需要销毁的数据 localStorage.removeItem('initTime') }