1. BackgroundButtons are very commonly used, and Element's button functions are quite comprehensive, which we will introduce in this article. First look at the effect diagram of various buttons: Before analyzing the source code, let's take a look at the official documentation for the use of button: 2. Button ClassificationThe classification of el-button buttons is basically distinguished by color. There is also a text button type="text". Since text buttons are relatively small, they are more suitable for the operation bar part of each row of the table. Button categories: <el-button>Default</el-button> <el-button type="primary">primary</el-button> <el-button type="success">success</el-button> <el-button type="info">info</el-button> <el-button type="warning">warning</el-button> <el-button type="danger">danger</el-button> <el-button type="text">text</el-button> 3. Button StyleElement provides plain buttons, rounded buttons, and circular buttons. It should be noted that circular buttons usually only contain one icon. The code is as follows: Button Style: <el-button type="primary" plain>Plain button</el-button> <el-button type="primary" round>Rounded button</el-button> <el-button type="primary" circle icon="el-icon-search"></el-button> 4. Button StatusThe button state is actually a function of the HTML standard, which can be disabled by using disabled. Button states: <el-button type="primary">Normal</el-button> <el-button type="primary" disabled>Disable</el-button> 5. Button GroupingButton grouping is very useful. For example, common paging buttons look better when grouped together. This can be achieved by wrapping the buttons with <el-button-group>. Button Grouping: <el-button-group> <el-button type="primary" icon="el-icon-arrow-left">Previous page</el-button> <el-button type="primary">Next page<i class="el-icon-arrow-right el-icon--right"></i></el-button> </el-button-group> 6. Button sizeHungry provides four sizes: default, medium, small, and very small. The code is as follows: Button size: <el-button>Default</el-button> <el-button type="primary" size="medium">medium</el-button> <el-button type="primary" size="small">small</el-button> <el-button type="primary" size="mini">mini</el-button> 7. SummaryThe functions provided by el-button are already quite complete, so you can just use them. Note that it is not recommended to define your own style to modify the default style, which may easily lead to inconsistent appearance. This is the end of this article about the detailed usage of the Element el-button button component. For more related Element el-button button component content, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: MySQL slow query pt-query-digest analysis of slow query log
>>: 4 Scanning Tools for the Linux Desktop
1. Download the alpine image [root@docker43 ~]# d...
Table of contents What to do when registering an ...
The HTTP status code is a 3-digit code used to in...
Table of contents Download tf-gpu Build your own ...
Some time ago, when I was working on a small func...
In this article, we’ll explore how async/await is...
1. mysqlbinlog: [ERROR] unknown variable 'def...
In this article, we will learn about the optimiza...
Last night I wrote an essay about the browser ren...
Table of contents Common payment methods in proje...
Due to hardware reasons, the machines may not kee...
Copy code The code is as follows: @charset "...
The advantage of the master-slave synchronization...
This article shares the installation and configur...
Beginners can learn HTML by understanding some HT...