Home>Article>Web Front-end> Sharing examples of environment construction for vue.js, element-ui, and vuex
vue init webpack
npm install
npm run dev
Address Enter localhost:8080
##4. Import elementUI packagenpm install --save vue element-ui
npm install --save vue-router
npminstall --save axios
npm install sass-loader -Dnpm install node-sass -D
import ElementUI from 'element-ui'import 'element-ui/lib/theme-chalk/index.css';import VueRouter from 'vue-router'Vue.use(ElementUI) Vue.use(VueRouter)New login vue file: Ulogin.vue
index.js file in router Configure routing:系统登录
登录
import Ulogin from '../components/Ulogin'Vue.use(Router) export default new Router({ routes: [ // { // path: '/', // name: 'HelloWorld', // component: HelloWorld // }, { path:'/', name:'', component:Ulogin } ] })App.vue
Directory structure: Run: npm run dev
Detailed tutorial on how to build a vue, node, and webpack environment
Detailed examples of simple tutorials on building a vue environment
Recommendations for the 6 best PHP environment building tools in 2017
The above is the detailed content of Sharing examples of environment construction for vue.js, element-ui, and vuex. For more information, please follow other related articles on the PHP Chinese website!