How to use element-ui component Library in js
Editor to share with you how to use the element-ui component library in js, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
When using the element-ui component library in the project, we often need to operate the table and encounter some problems in the process of editing the style. the official website gives a lot of api for table, which can be customized by ourselves, which can basically meet the needs of the product, but no specific cases are given, and the information on the Internet is also relatively simple. Here we simply sort out some common operations, and if there are similar functions, we can do a reference.
Can javascriptelementui's table be manipulated to td-level css?
Customize the contents of the column
Requirements: add an action button in the last column of the table
Image
Add the action button through slot-scope= "scope", which is a special slot for us to customize and add different content.
Editing
Delete
Elementtd operation code
Scope.$index gets the current line subscript
The added action button can obtain the corresponding subscript of the current line through scope.$index.