<div id="app">
<p>$route.name: {{$route.name}}</p>
<p>$route.path: {{$route.path}}</p>
<p>$route.query: {{$route.query}}</p>
</div>
<script src="/static/js/vue.js"></script>
<script src="/static/js/vue-router.js"></script>
<script>
const router = new VueRouter({
mode: "history", // 默认使用hash模式,url会出现#
});
const app = new Vue({
router,
el: "#app",
});
</script>