Detailed explanation of how to use element-plus in Vue3

Detailed explanation of how to use element-plus in Vue3

Vue3 has been out for a while, and element has also updated its version to be compatible with vue3. Here is a brief introduction on how to use element-plus

1. Installation

npm install element-plus --save

2. Import in main.js

import { createApp, Vue } from 'vue';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import App from './App.vue';

const app = createApp(App)
app.use(ElementPlus)
app.mount('#app')

3. Use

Here we use the button

<el-row>
  <el-button>Default button</el-button>
  <el-button type="primary">Primary button</el-button>
  <el-button type="success">Success button</el-button>
  <el-button type="info">Information button</el-button>
  <el-button type="warning">Warning button</el-button>
  <el-button type="danger">Danger button</el-button>
</el-row>

For details, please refer to the official documentation

This is the end of this article about how to use element-plus in Vue3. For more information about how to use element-plus in Vue3, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Two examples of using icons in Vue3
  • Detailed explanation of the process of using Icon icons globally in element-plus in Vue3

<<:  A brief analysis of the function calling process under the ARM architecture

>>:  The magic of tbody tag speeds up the display of table content

Recommend

Introduction to vim plugin installation under Linux system

Table of contents Install vim plugin manager Add ...

Usage and scenario analysis of npx command in Node.js

npx usage tutorial Tonight, when I was learning V...

Use of Linux cal command

1. Command Introduction The cal (calendar) comman...

A brief analysis of React Native startReactApplication method

In this article, we sorted out the startup proces...

A brief analysis of MySQL cardinality statistics

1. What is the cardinality? Cardinality refers to...

Linux View File System Type Example Method

How to check the file system type of a partition ...

Script example for starting and stopping spring boot projects in Linux

There are three ways to start a springboot projec...

How to install ROS Noetic in Ubuntu 20.04

Disclaimer: Since the project requires the use of...

A brief discussion on the magical uses of CSS pseudo-elements and pseudo-classes

CSS plays a very important role in a web page. Wi...

Complete steps for Docker to pull images

1. Docker pull pulls the image When using $ docke...

Detailed explanation of CocosCreator project structure mechanism

Table of contents 1. Project folder structure 1. ...

Summary of the differences and usage of plugins and components in Vue

The operating environment of this tutorial: Windo...

Differences between FLOW CHART and UI FLOW

Many concepts in UI design may seem similar in wo...

Oracle VM VirtualBox installation of CentOS7 operating system tutorial diagram

Table of contents Installation Steps Environment ...

How to match the size of text in web design: small text, big experience

With the rise of mobile terminals such as iPad, p...