This article mainly introduces how to add floating prompts to header icons in ElementUI tables, and shares them with you. The details are as follows: <el-table-column label="operation" fixed="right" :render-header="tableAction" width="120"> <!--scope is userList scope.row is the current row data--> <template slot-scope="scope"> <el-button @click="editCar(scope.row)" type="primary" icon="el-icon-edit" size="small" circle></el-button> <el-button @click="delCar(scope.row.carId)" type="danger" icon="el-icon-delete" circle size="small"></el-button> </template> </el-table-column> //Table operation prompt tableAction() { return this.$createElement('HelpHint', { props: { content: 'Edit vehicle/Delete vehicle' } }, 'operate'); }, Remember to import import HelpHint from '~/components/HelpHint/HelpHint.vue'; And introduce it in components HelpHint.vue component content <template> <span> <span style="margin-right: 8px"><slot></slot></span> <el-tooltip :content="content" :placement="placement"> <i class="el-icon-question" style="cursor: pointer;"></i> </el-tooltip> </span> </template> <script> export default { name: 'HelpHint', props: { placement: default: 'top' }, content: String, }, data() { return {} }, } </script> This is the end of this article about adding header icon floating prompts in ElementUI tables. For more relevant Element icon floating prompts, 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:
|
<<: SQL to implement time series dislocation restoration case
>>: CSS3 realizes bouncing ball animation
I recently came into contact with MySQL. Yesterda...
Today, the error "No input file specified&qu...
This article mainly introduces the pie chart data...
Step 1: Download the mysql driver cmd enters the ...
Table of contents Preface know Practice makes per...
Use the FRAME property to control the style type ...
Compared with ordinary programs, dynamic link lib...
Table of contents File() grammar parameter Exampl...
Use Nginx to build Tomcat9 cluster and Redis to r...
Get the mongo image sudo docker pull mongo Run th...
Linux col command The Linux col command is used t...
1. Check the character set 1. Check the MYSQL dat...
px(pixel) I believe everyone is familiar with the...
In response to the popularity of nodejs, we have ...
When we add an svg image to display, react prompt...