说说如何使用 vue-router 插件

1 安装 首先,通过 npm 安装 vue-router 插件: npm install --save vue-router 安装的插件版本是:[email protected] 2 用法 2.1 新建 vue 组件 在 router 目录中,新建 views 目录,然后新建两个 vue 组件(一个页面就对应一个组件)。 index.vue: <template> <div>首页</div
相关文章
相关标签/搜索