当前位置:网站首页>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>
边栏推荐
- What is the problem with the SQL group by statement
- Introduction to the use of SAP Fiori application index tool and SAP Fiori tools
- 强化学习-学习笔记5 | AlphaGo
- [MySQL] basic use of cursor
- 1_ Introduction to go language
- Tips for web development: skillfully use ThreadLocal to avoid layer by layer value transmission
- js中,字符串和数组互转(二)——数组转为字符串的方法
- Deployment of external server area and dual machine hot standby of firewall Foundation
- Web开发小妙招:巧用ThreadLocal规避层层传值
- js中,字符串和数组互转(一)——字符串转为数组的方法
猜你喜欢

967- letter combination of telephone number

Intel 48 core new Xeon run point exposure: unexpected results against AMD zen3 in 3D cache

愛可可AI前沿推介(7.6)

拼多多败诉,砍价始终差0.9%一案宣判;微信内测同一手机号可注册两个账号功能;2022年度菲尔兹奖公布|极客头条

【mysql】触发器

基于深度学习的参考帧生成

数据湖(八):Iceberg数据存储格式

2022 fields Award Announced! The first Korean Xu Long'er was on the list, and four post-80s women won the prize. Ukrainian female mathematicians became the only two women to win the prize in history

New database, multidimensional table platform inventory note, flowus, airtable, seatable, Vig table Vika, Feishu multidimensional table, heipayun, Zhixin information, YuQue

Common English vocabulary that every programmer must master (recommended Collection)
随机推荐
Pycharm remote execution
Le langage r visualise les relations entre plus de deux variables de classification (catégories), crée des plots Mosaiques en utilisant la fonction Mosaic dans le paquet VCD, et visualise les relation
js 根据汉字首字母排序(省份排序) 或 根据英文首字母排序——za排序 & az排序
15million employees are easy to manage, and the cloud native database gaussdb makes HR office more efficient
Yyds dry inventory run kubeedge official example_ Counter demo counter
What key progress has been made in deep learning in 2021?
What's the best way to get TFS to output each project to its own directory?
Three schemes of SVM to realize multi classification
Can novices speculate in stocks for 200 yuan? Is the securities account given by qiniu safe?
Pat 1078 hashing (25 points) ⼆ times ⽅ exploration method
【OpenCV 例程200篇】220.对图像进行马赛克处理
Swagger UI教程 API 文档神器
Nodejs教程之让我们用 typescript 创建你的第一个 expressjs 应用程序
KDD 2022 | 通过知识增强的提示学习实现统一的对话式推荐
代理和反向代理
审稿人dis整个研究方向已经不仅仅是在审我的稿子了怎么办?
Web开发小妙招:巧用ThreadLocal规避层层传值
'class file has wrong version 52.0, should be 50.0' - class file has wrong version 52.0, should be 50.0
SAP UI5 框架的 manifest.json
Manifest of SAP ui5 framework json