Questions about element.ui tables

ask whether the element.ui table can filter columns and choose which columns to display or not to display.

Mar.28,2021

For questions like this, please read element-ui read the table component of the official website. The answer can generally be found

clipboard.png


this function has been done, but based on the depth of the business, it has been written into a global mixin, inconvenient paste code. The general idea is as follows:

because considering that the filtering function of ElTable is to filter data, it is not used. Instead, a drop-down header is customized with render-header . The header is a button and a drop-down menu is clicked.

determine the display and hiding of a column according to the click of the menu. An array is used to maintain the display and hiding of all the columns of the table, and each column of the table is controlled by v-if.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b31449-2bd65.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b31449-2bd65.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?