继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

vue-sell-master练习笔记

rookie_r
关注TA
已关注
手记 8
粉丝 7
获赞 7

main.js代码:
import Vue from 'vue';
import VueRouter from 'vue-router';
import VueResource from 'vue-resource';
import App from './App';
import goods from 'components/goods/goods';
import ratings from 'components/ratings/ratings';
import seller from 'components/seller/seller';

import 'common/stylus/index.styl';

Vue.use(VueRouter);
Vue.use(VueResource);

const routes = [{
path: '/',
redirect: '/goods'
}, {
path: '/goods',
component: goods
}, {
path: '/ratings',
component: ratings
}, {
path: '/seller',
component: seller
}];

const router = new VueRouter({
linkActiveClass: 'active',
routes
});

/ eslint-disable no-new /
new Vue({
el: '#app',
router,
render: h => h(App)
});

打开App,阅读手记
1人推荐
发表评论
随时随地看视频慕课网APP