hash JavaScript中原始用法,比正常路径多了一层#
const router = new VueRouter({
mode:'history', /* 两个参数 history, hash JavaScript中原始用法,比正常路径多了一层# http://localhost:8080/#/Users*/
data(){
return{
aaa:'fade'
}
},
base: __dirname,
routes:[
{path:'/',component:Home},
{path:'/Parent',component:Parent},
{path:'/Users',component:Users}
]
})
history的时候:
hash的时候: