
Vue
ggmshm
前端慢慢爬
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Vue.js——全局守卫
全局守卫 const routes=[ {path:'/',name:"homeLink",component:Home}, {path:'/menu',component:Menu}, {path:'*',redirect:'/'} ] const router=new VueRouter({ routes, mode:"history" }) router.beforeEach...原创 2019-07-18 09:54:45 · 768 阅读 · 0 评论 -
Vue.js——路由2 复用路由
在routes.js 配置路由中 将 component 改为 components export const routes=[ {path:'/',name:"homeLink",components:{ default:Home, 'orderingGuide':OrderingGuide, 'delivery':Delivery, 'history':History ...原创 2019-07-18 10:13:00 · 1034 阅读 · 0 评论 -
Vue.js准备工作1
有时间整理一下Vue的初始操作 如下 首先cmd一下 ->检查node版本号(木有安装移步node相关博客) node -v 接下来就是搭建脚手架 全局安装vue-cli npm install --global vue-cli 创建一个项目 vue init webpack vue-playlist //或者简单版本 vue init webpack-simple v...原创 2019-07-17 11:11:36 · 112 阅读 · 0 评论 -
Vue.js——路由1
使用路由,首先要下载路由 进入cmd然后层层进入项目 npm install vue-router --save 重新运行一下 npm run dev 准备工作做好了 接下来在main.js中配置一下你的路由信息 // 引入路由 import VueRouter from 'vue-router' // 引入跳转的目标文件 这里用的都是组件 import Home from './...原创 2019-07-17 14:22:44 · 192 阅读 · 0 评论