当前位置:网站首页>El table table - sortable sorting & disordered sorting when decimal and% appear
El table table - sortable sorting & disordered sorting when decimal and% appear
2022-07-06 21:10:00 【viceen】
el-table form ——sortable Sort & Decimal number appears 、% When sorting out
The front end implements sorting
Just add a sortable Attribute is enough
<el-table-column prop="bookCount" label=" Total books " align="center" :show-overflow-tooltip="true" sortable ></el-table-column>
problem 1、 When decimals appear in the data , Result in disordered sorting
solve :
<el-table-column prop="intoRate" label=" Timely mobilization rate " align="center" :sort-method="(a,b)=>{return a.intoRate - b.intoRate}" :show-overflow-tooltip="true" sortable ></el-table-column>
problem 2、 When data needs to be used % To display , The directly returned data contains % Result in disordered sorting , You need to return the normal number , Splice here %
solve
<el-table-column prop="intoRate" label=" Timely mobilization rate " align="center" :sort-method="(a,b)=>{return a.intoRate - b.intoRate}" :show-overflow-tooltip="true" sortable>
<template slot-scope="scope">
{
{ scope.row.intoRate }}%
</template>
</el-table-column>
边栏推荐
- It's almost the new year, and my heart is lazy
- Infrared thermometer based on STM32 single chip microcomputer (with face detection)
- 【OpenCV 例程200篇】220.对图像进行马赛克处理
- PG basics -- Logical Structure Management (transaction)
- Reflection operation exercise
- Why do job hopping take more than promotion?
- No Yum source to install SPuG monitoring
- How to turn a multi digit number into a digital list
- Three schemes of SVM to realize multi classification
- Comprehensive evaluation and recommendation of the most comprehensive knowledge base management tools in the whole network: flowus, baklib, jiandaoyun, ones wiki, pingcode, seed, mebox, Yifang cloud,
猜你喜欢
2017 8th Blue Bridge Cup group a provincial tournament
[200 opencv routines] 220 Mosaic the image
This year, Jianzhi Tencent
PHP online examination system version 4.0 source code computer + mobile terminal
全网最全的知识库管理工具综合评测和推荐:FlowUs、Baklib、简道云、ONES Wiki 、PingCode、Seed、MeBox、亿方云、智米云、搜阅云、天翎
967- letter combination of telephone number
3D face reconstruction: from basic knowledge to recognition / reconstruction methods!
Manifest of SAP ui5 framework json
面试官:Redis中有序集合的内部实现方式是什么?
3D人脸重建:从基础知识到识别/重建方法!
随机推荐
How do I remove duplicates from the list- How to remove duplicates from a list?
@GetMapping、@PostMapping 和 @RequestMapping详细区别附实战代码(全)
[MySQL] trigger
Is it safe to open an account in flush? Which securities company is good at opening an account? Low handling charges
C language operators
el-table表格——获取单击的是第几行和第几列 & 表格排序之el-table与sort-change、el-table-column与sort-method & 清除排序-clearSort
039. (2.8) thoughts in the ward
Is it profitable to host an Olympic Games?
OSPF多区域配置
3D人脸重建:从基础知识到识别/重建方法!
数据湖(八):Iceberg数据存储格式
爱可可AI前沿推介(7.6)
Pinduoduo lost the lawsuit, and the case of bargain price difference of 0.9% was sentenced; Wechat internal test, the same mobile phone number can register two account functions; 2022 fields Awards an
What are RDB and AOF
2022菲尔兹奖揭晓!首位韩裔许埈珥上榜,四位80后得奖,乌克兰女数学家成史上唯二获奖女性
R language visualizes the relationship between more than two classification (category) variables, uses mosaic function in VCD package to create mosaic plots, and visualizes the relationship between tw
Pat 1078 hashing (25 points) ⼆ times ⽅ exploration method
ICML 2022 | Flowformer: 任务通用的线性复杂度Transformer
正则表达式收集
How to implement common frameworks