el-table performs custom ascending and descending sorting according to a certain rule

Case effect

insert image description here

Click the arrow after the creation time to customize whether to sort by time in ascending or descending order

<el-table-column prop="sysCreateTime" :default-sort="{ order: 'descending' }" sortable label="创建时间" width="300"></el-table-column>

Main code: default-sort="{ order: 'descending' }" sortable

daily share

Life is full of appearances, the state of the world, and the joys and sorrows constitute the perfection of life; people make things happen, and things happen in heaven. Don't regret what you have done. It is often seen that many people feel sorry for themselves, regret for the wrong things they have done, feel depressed and down for the past. There is never a regret medicine in the world.

CSDN community "Creation Talents" activity, as long as you participate and create articles, you will have the opportunity to win official prizes: boutique calendars, new programmers magazines, come and participate! Link to https://bbs.csdn.net/topics/605272551

Guess you like

Origin blog.csdn.net/weixin_50001396/article/details/123525939