当前位置:网站首页>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>
边栏推荐
- Huawei device command
- How to implement common frameworks
- C # use Oracle stored procedure to obtain result set instance
- [asp.net core] set the format of Web API response data -- formatfilter feature
- 字符串的使用方法之startwith()-以XX开头、endsWith()-以XX结尾、trim()-删除两端空格
- 3D face reconstruction: from basic knowledge to recognition / reconstruction methods!
- 20220211 failure - maximum amount of data supported by mongodb
- 2017 8th Blue Bridge Cup group a provincial tournament
- 039. (2.8) thoughts in the ward
- Reflection operation exercise
猜你喜欢

Data Lake (VIII): Iceberg data storage format

Swagger UI tutorial API document artifact

【微信小程序】運行機制和更新機制

嵌入式开发的7大原罪

What key progress has been made in deep learning in 2021?

【论文解读】用于白内障分级/分类的机器学习技术
![[asp.net core] set the format of Web API response data -- formatfilter feature](/img/6b/e3d513f63b244f9f32555d3b3bec8c.jpg)
[asp.net core] set the format of Web API response data -- formatfilter feature

2022菲尔兹奖揭晓!首位韩裔许埈珥上榜,四位80后得奖,乌克兰女数学家成史上唯二获奖女性

PHP saves session data to MySQL database

LLVM之父Chris Lattner:为什么我们要重建AI基础设施软件
随机推荐
Pycharm remote execution
Swagger UI tutorial API document artifact
[asp.net core] set the format of Web API response data -- formatfilter feature
每个程序员必须掌握的常用英语词汇(建议收藏)
039. (2.8) thoughts in the ward
Is this the feeling of being spoiled by bytes?
966 minimum path sum
【深度学习】PyTorch 1.12发布,正式支持苹果M1芯片GPU加速,修复众多Bug
C language operators
MLP (multilayer perceptron neural network) is a multilayer fully connected neural network model.
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,
基于STM32单片机设计的红外测温仪(带人脸检测)
User defined current limiting annotation
Notes - detailed steps of training, testing and verification of yolo-v4-tiny source code
[200 opencv routines] 220 Mosaic the image
js之遍历数组、字符串
Mtcnn face detection
This year, Jianzhi Tencent
Can novices speculate in stocks for 200 yuan? Is the securities account given by qiniu safe?
硬件开发笔记(十): 硬件开发基本流程,制作一个USB转RS232的模块(九):创建CH340G/MAX232封装库sop-16并关联原理图元器件