How to implement vue router 404

how does vue-router jump 404 requests that are not in the routing table?

Jun.13,2022

clipboard.png


after using the history mode, you need to cover all the routes in the Vue application, and then give a 404 page.

const router = new VueRouter({
  mode: 'history',
  routes: [
    { path: '*', component: NotFoundComponent }
  ]
})
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-1e47bb4-43984.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-1e47bb4-43984.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?