Home  >  Article  >  Web Front-end  >  What is elementUI in vue

What is elementUI in vue

coldplay.xixi
coldplay.xixiOriginal
2020-12-03 11:39:0435422browse

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.

What is elementUI in vue

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

  • ##Element-Ui is a component library based on vue encapsulation, which simplifies commonly used The encapsulation of components improves the principle of reusability;

  • vue is a progressive framework and Element-Ui is a component library;

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 -g

Note: -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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn