Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use element-ui component Library in js

Shulou Source: shulou.com Published: 2022-06-03 11:02:30 11月15日 Update

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.

Tags: Subscript content properties components buttons articles tables requirements references different abbreviated one line not so products codes functions can be passed most names commonly used Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Xiaomi MariaDB Docker Shulou Technology