1.不用修改官网中任何css或者html
2.按需引入,不是只是引入官网的就可以
import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import First from '@/components/views/First'
import Second from '@/components/views/Second'
import Index from '@/components/views/Index'
import {Container,Header,Main} from 'element-ui'
Vue.use(Router)
Vue.use(Container)
Vue.use(Header)
Vue.use(Main)
export default new Router({
routes: [
{
path: '/',
name: 'HelloWorld',
component: HelloWorld
}, {
path: '/first',
name: 'First',
component: First
}, {
path: '/second',
name: 'Second',
component: Second
}, {
path: '/index',
name: 'Index',
component: Index
}
]
})
就可以啦