当前位置:网站首页>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>
边栏推荐
- 【mysql】触发器
- 2022菲尔兹奖揭晓!首位韩裔许埈珥上榜,四位80后得奖,乌克兰女数学家成史上唯二获奖女性
- @GetMapping、@PostMapping 和 @RequestMapping详细区别附实战代码(全)
- Statistical inference: maximum likelihood estimation, Bayesian estimation and variance deviation decomposition
- C language games - three chess
- Swagger UI tutorial API document artifact
- PHP online examination system version 4.0 source code computer + mobile terminal
- c#使用oracle存储过程获取结果集实例
- [asp.net core] set the format of Web API response data -- formatfilter feature
- 爱可可AI前沿推介(7.6)
猜你喜欢
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,
20220211 failure - maximum amount of data supported by mongodb
Pycharm remote execution
[MySQL] basic use of cursor
2022菲尔兹奖揭晓!首位韩裔许埈珥上榜,四位80后得奖,乌克兰女数学家成史上唯二获奖女性
ICML 2022 | flowformer: task generic linear complexity transformer
##无yum源安装spug监控
Intel 48 core new Xeon run point exposure: unexpected results against AMD zen3 in 3D cache
2017 8th Blue Bridge Cup group a provincial tournament
Chris LATTNER, the father of llvm: why should we rebuild AI infrastructure software
随机推荐
【论文解读】用于白内障分级/分类的机器学习技术
Pat 1085 perfect sequence (25 points) perfect sequence
面试官:Redis中有序集合的内部实现方式是什么?
Study notes of grain Mall - phase I: Project Introduction
3D人脸重建:从基础知识到识别/重建方法!
039. (2.8) thoughts in the ward
Can novices speculate in stocks for 200 yuan? Is the securities account given by qiniu safe?
Infrared thermometer based on STM32 single chip microcomputer (with face detection)
过程化sql在定义变量上与c语言中的变量定义有什么区别
Three schemes of SVM to realize multi classification
什么是RDB和AOF
[200 opencv routines] 220 Mosaic the image
3D face reconstruction: from basic knowledge to recognition / reconstruction methods!
Laravel notes - add the function of locking accounts after 5 login failures in user-defined login (improve system security)
20220211 failure - maximum amount of data supported by mongodb
Xcode6 error: "no matching provisioning profiles found for application"
Aike AI frontier promotion (7.6)
038. (2.7) less anxiety
Manifest of SAP ui5 framework json
What is the difference between procedural SQL and C language in defining variables