当前位置:网站首页>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>
边栏推荐
- 基于深度学习的参考帧生成
- C language operators
- document.write()的用法-写入文本——修改样式、位置控制
- 968 edit distance
- After working for 5 years, this experience is left when you reach P7. You have helped your friends get 10 offers
- Aike AI frontier promotion (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
- 全网最全的新型数据库、多维表格平台盘点 Notion、FlowUs、Airtable、SeaTable、维格表 Vika、飞书多维表格、黑帕云、织信 Informat、语雀
- Is this the feeling of being spoiled by bytes?
- Yyds dry inventory run kubeedge official example_ Counter demo counter
猜你喜欢

ICML 2022 | Flowformer: 任务通用的线性复杂度Transformer

Distributed ID

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

SAP UI5 框架的 manifest.json

性能测试过程和计划

【Redis设计与实现】第一部分 :Redis数据结构和对象 总结

Laravel笔记-自定义登录中新增登录5次失败锁账户功能(提高系统安全性)

Spark SQL chasing Wife Series (initial understanding)

全网最全的知识库管理工具综合评测和推荐:FlowUs、Baklib、简道云、ONES Wiki 、PingCode、Seed、MeBox、亿方云、智米云、搜阅云、天翎

Variable star --- article module (1)
随机推荐
防火墙基础之外网服务器区部署和双机热备
Performance test process and plan
js 根据汉字首字母排序(省份排序) 或 根据英文首字母排序——za排序 & az排序
【深度学习】PyTorch 1.12发布,正式支持苹果M1芯片GPU加速,修复众多Bug
Yyds dry goods count re comb this of arrow function
Pat 1085 perfect sequence (25 points) perfect sequence
How to implement common frameworks
JS操作dom元素(一)——获取DOM节点的六种方式
Nodejs教程之让我们用 typescript 创建你的第一个 expressjs 应用程序
KDD 2022 | realize unified conversational recommendation through knowledge enhanced prompt learning
Web开发小妙招:巧用ThreadLocal规避层层传值
It's almost the new year, and my heart is lazy
【微信小程序】運行機制和更新機制
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,
What is the difference between procedural SQL and C language in defining variables
Manifest of SAP ui5 framework json
c#使用oracle存储过程获取结果集实例
什么是RDB和AOF
for循环中break与continue的区别——break-完全结束循环 & continue-终止本次循环
038. (2.7) less anxiety