P32. vue-router 路由组件传参和不同的历史记录
文章目录
路由组件传参
命名视图

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模式


#消失

评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论