当前位置:网站首页>el-table表格——sortable排序 & 出现小数、%时排序错乱
el-table表格——sortable排序 & 出现小数、%时排序错乱
2022-07-06 12:51:00 【viceen】
el-table表格——sortable排序 & 出现小数、%时排序错乱
前端实现排序
只需要在表头上加上一个sortable属性即可
<el-table-column prop="bookCount" label="图书总量" align="center" :show-overflow-tooltip="true" sortable ></el-table-column>
问题1、当数据中出现小数,导致排序错乱
解决:
<el-table-column prop="intoRate" label="进场及时率" align="center" :sort-method="(a,b)=>{return a.intoRate - b.intoRate}" :show-overflow-tooltip="true" sortable ></el-table-column>
问题2、当数据需要使用%来显示,直接返回的数据含有%导致排序错乱,需要返回正常数字,在这里进行拼接%
解决
<el-table-column prop="intoRate" label="进场及时率" 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 games - minesweeping
- Pat 1085 perfect sequence (25 points) perfect sequence
- 2022 refrigeration and air conditioning equipment installation and repair examination contents and new version of refrigeration and air conditioning equipment installation and repair examination quest
- How to implement common frameworks
- js中,字符串和数组互转(一)——字符串转为数组的方法
- Build your own application based on Google's open source tensorflow object detection API video object recognition system (IV)
- 过程化sql在定义变量上与c语言中的变量定义有什么区别
- 强化学习-学习笔记5 | AlphaGo
- The mail command is used in combination with the pipeline command statement
- 2022 Guangdong Provincial Safety Officer C certificate third batch (full-time safety production management personnel) simulation examination and Guangdong Provincial Safety Officer C certificate third
猜你喜欢
2022 Guangdong Provincial Safety Officer C certificate third batch (full-time safety production management personnel) simulation examination and Guangdong Provincial Safety Officer C certificate third
The most comprehensive new database in the whole network, multidimensional table platform inventory note, flowus, airtable, seatable, Vig table Vika, flying Book Multidimensional table, heipayun, Zhix
[diy] self designed Microsoft makecode arcade, official open source software and hardware
Redis insert data garbled solution
全网最全的知识库管理工具综合评测和推荐:FlowUs、Baklib、简道云、ONES Wiki 、PingCode、Seed、MeBox、亿方云、智米云、搜阅云、天翎
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,
Entity alignment two of knowledge map
MLP (multilayer perceptron neural network) is a multilayer fully connected neural network model.
【mysql】触发器
Core principles of video games
随机推荐
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,
'class file has wrong version 52.0, should be 50.0' - class file has wrong version 52.0, should be 50.0
R語言可視化兩個以上的分類(類別)變量之間的關系、使用vcd包中的Mosaic函數創建馬賽克圖( Mosaic plots)、分別可視化兩個、三個、四個分類變量的關系的馬賽克圖
知识图谱之实体对齐二
PHP online examination system version 4.0 source code computer + mobile terminal
Infrared thermometer based on STM32 single chip microcomputer (with face detection)
No Yum source to install SPuG monitoring
全网最全的知识库管理工具综合评测和推荐:FlowUs、Baklib、简道云、ONES Wiki 、PingCode、Seed、MeBox、亿方云、智米云、搜阅云、天翎
Introduction to the use of SAP Fiori application index tool and SAP Fiori tools
[DIY]自己设计微软MakeCode街机,官方开源软硬件
How to upgrade high value-added links in the textile and clothing industry? APS to help
Notes - detailed steps of training, testing and verification of yolo-v4-tiny source code
Hardware development notes (10): basic process of hardware development, making a USB to RS232 module (9): create ch340g/max232 package library sop-16 and associate principle primitive devices
Select data Column subset in table R [duplicate] - select subset of columns in data table R [duplicate]
#yyds干货盘点#重新梳理箭头函数的this
SAP UI5 框架的 manifest.json
966 minimum path sum
15 millions d'employés sont faciles à gérer et la base de données native du cloud gaussdb rend le Bureau des RH plus efficace
Redis insert data garbled solution
[MySQL] basic use of cursor