赞
踩
官方网站:
https://element.eleme.cn/#/zh-CN/component/installation
vue create 项目名
npm i element-ui
/* 导入element-ui样式 */ import 'element-ui/lib/theme-chalk/index.css' import Vue from 'vue' import App from './App.vue' import router from './router' import store from './store' /* element-ui所有组件 */ import ElementUI from 'element-ui' Vue.use(ElementUI) Vue.config.productionTip = false new Vue({ router, store, render: h => h(App) }).$mount('#app')
https://element.eleme.cn/#/zh-CN/component/container
/* 导入element-ui样式 */ import 'element-ui/lib/theme-chalk/index.css' import Vue from 'vue' import App from './App.vue' import router from './router' import store from './store' /* element-ui所有组件 */ import ElementUI from 'element-ui' Vue.use(ElementUI) Vue.config.productionTip = false new Vue({ router, store, render: h => h(App) }).$mount('#app')
<template> <div id="app"> <el-container> <el-header>Header</el-header> <el-main>Main</el-main> <el-footer>Footer</el-footer> </el-container> </div> </template> <script> export default { } </script> <style> /* 稍后删除 */ .el-header, .el-footer { background-color: #B3C0D1; color: #333; text-align: center; line-height: 60px; } </style>
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,th,td { margin: 0; padding: 0; } table { border-collapse: collapse; border-spacing: 0; } fieldset,img { border: 0; } address,caption,cite,code,dfn,em,strong,th,var { font-style: normal; font-weight: normal; } ol,ul { list-style: none; } caption,th { text-align: left; } h1,h2,h3,h4,h5,h6 { font-size: 100%; font-weight: normal;
https://www.cnblogs.com/weizhxa/p/9885329.html
/** 导入公共样式 */ import '@/assets/app.css' /* 导入element-ui样式 */ import 'element-ui/lib/theme-chalk/index.css' import Vue from 'vue' import App from './App.vue' import router from './router' import store from './store' /* element-ui所有组件 */ import ElementUI from 'element-ui' Vue.use(ElementUI) Vue.config.productionTip = false new Vue({ router, store, render: h => h(App) }).$mount('#app')
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。