When vue.js logs in to the website for the first time, clicking the enter key on the keyboard will cause the page route to jump to the root path. Refreshing the page and then pressing enter will not jump.

vue.js first login website click the keyboard enter key will cause the page route to jump to the root path, refresh the page and then press enter will not jump, this is how to return a responsibility?
the following is my route interception
/ / Route interception
router.beforeEach ((to, from, next) = > {
if (to.path ="/"| | to.path ="/ register" | | to.path ="/ resetpwd") {

next()

} else if (! window.sessionStorage.token) {

router.push("/")

} else {

next()

}
})

Sep.27,2021

you need to see where your enter key is captured, where is the focus of the page when it jumps, and where is the focus after refresh


where is the @ keyup.enter= "function" statement?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9875e-5c4f5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9875e-5c4f5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?