handleCommand(command) { //触发事件
if (command === "back") {
this.$router.push({
path: "***", //跳转的路径
});
window.localStorage.clear(); //清除所有key
// 退出后禁止返回上一页
history.pushState(null, null, document.URL);
window.addEventListener(
"popstate",
function (e) {
history.pushState(null, null, document.URL);
},
false
);
}
},
博客涉及Vue和JavaScript相关内容,但具体信息缺失。Vue是前端开发框架,JavaScript是常用脚本语言,二者在前端开发中应用广泛。
4488

被折叠的 条评论
为什么被折叠?



