In my Vue project, I press the delete key and there will be a historical fallback like router.go (- 1). How can I stop it?

in my Vue project, I press the delete key and there is a historical fallback like router.go (- 1). How can I stop it? Is it set somewhere in the project?

Mar.21,2021

you mean the delete key in the upper right corner, which has nothing to do with vue. Some systems are like this. Press that key to go back to the page.


pumpkin head is right. But you can still bind keyboard events to window to prevent


if you don't listen to delete keystrokes and execute router.go (- 1) yourself, this problem should only occur in specific browsers. You can listen to delete keystroke events to prevent the default behavior event.preventDefault ()

.
Menu