Home >Web Front-end >Vue.js >What is elementUI in vue
elementUI in vue is a set of UI component libraries implemented based on vue that does not rely on business. It provides a rich set of PC-side components, reduces the user's encapsulation of commonly used components, and reduces the ease of development.
The operating environment of this article: windows10 system, vue 2.9, thinkpad t480 computer.
【Recommended free related articles: vue.js】
1. Introduction to vue
Vue is a progressive JavaScript framework for building user interfaces. Developers only need to focus on the view layer. It is not only easy to get started, but also easy to integrate with third-party libraries or existing projects. It is based on the MVVM (Model-View-ViewModel, namely: view layer-view model layer-model layer) design idea. Provides a library for two-way binding of MVVM data, focusing on the UI level.
2. Introduction to Element-Ui
element is a set of UI component libraries based on vue that does not rely on business. It provides a wealth of PC-side components and reduces the number of users. Encapsulation of commonly used components reduces the ease of development.
3. The relationship between vue and Element-Ui
4.Usage of vue Element-Ui
Step 1: Install vue-cli scaffolding (Note: The premise is to ensure that nodejs is installed. You can check whether it is by opening cmd and entering node -v Installation, the command line displays the version of nodejs, which means the installation is successful) Step 2: After the nodejs installation is completed, use the command to install vue and vue-cli. The command is as follows:cnpm install vuecnpm install vue-cli -gNote: -g Indicates global installation Step 3: Initialize webpack, the command is as follows:
vue init webpack 项目名Step 4: Fill in according to the prompts during initialization. After completion, element-ui can be installed, and then in index.js Just introduce global registration in , as shown below: Install element-ui
cnpm install element-ui --save index.js中引入全局注册 import ElementUi from 'elemet-ui'import '@/theme-et/index.css'Vue.use(ElementUi)
Related free learning recommendations: javascript(video)
The above is the detailed content of What is elementUI in vue. For more information, please follow other related articles on the PHP Chinese website!