路由组件传参

命名视图

ShopMain.vue

<template>  <h2>shop 次要内容</h2></template><script>export default {  name: "ShopMain",  props: ['id'],  mounted() {    console.log(this.id)  }}</script><style scoped></style>

不同的历史记录

hash 模式

二者的区别是有无#

html5模式

#隐没