Hash 路由配置

一、安装 vue-router

Ref: https://router.vuejs.org/zh/installation.html

  

二、准备组件

子组件一。

<template>
    <!-- 所有的内容要被根节点包含起来 -->
    <div id="home">
       我是首页组件
    </div>
</template>


<script>
    export default{
        data(){
            return {
               msg:'我是一个home组件'
            }
        }
    }
</script>

<style lang="scss" scoped>
</style>
View Code  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-06
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-16
  • 2021-11-17
  • 2021-08-09
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案