Element UI项目总结

Element UI

感觉很强大,

"element-ui": "^1.2.8",


cnpm install @[email protected] --save

走你



main.js中引入

import 'element-ui/lib/theme-default/index.c
ss'
import ElementUI from 'element-ui'


Vue. use( ElementUI)
全局映入 然后就可以使用了

配置路由
import VueRouter from 'vue-router'
import routes from './routes'
const router = new VueRouter({
routes
})

var appVue = new Vue({
router,
render: h => h( App) //调用render方法
}). $mount( '#app') //把element挂载到app上,


routes.js文件

import Cygrant from './pages/Cygrant.vue' //录入第三方数据
import Home from './pages/Home.vue'

let routes = [

{
path: '/',
component: Home,
name: '名字',
iconCls: 'el-icon-message', //图标样式class
children: [

{ path: '/CyGrant', component: Cygrant, name: '名字' },                 //发放电子币
]
},
{
path: '/404',
component: NotFound,
name: '',
hidden: true
},



];
export default routes;







你可能感兴趣的:(vue)