How does Vue router remove the characters before the-sharp number

I know about

mode history. I"m asking how to get to the characters before the pound sign in hash mode.
how to clean up useless characters, such as those before the-sharp sign, after modifying the address bar, and how to exclude paths that are not /

.
{
      path: "*",
      component: () => import("../pages/not_found")
    },
    {
      path: "/",
      redirect: "/index",
      component: layout,
      children: [{
        path: "/index",
        component: () => import("../pages/index")
      }]
    },

mode: 'history'


,,.



mode: 'history',HTML5 History


-sharp


hashhistory


a0 - 0


routermode


Vue-routerhashHTML5history
vue-router:ide/essentials/history-mode.html" rel="nofollow noreferrer">https://router.vuejs.org/zh/g...



clipboard.png

add mode: 'history', to the routing configuration in index.js to enable HTML5 history mode. It's okay to answer upstairs.

Menu