fix(图表): 表格表头排序字符串类型字段排序错误

This commit is contained in:
wisonic 2024-07-29 11:06:27 +08:00
parent 103a64f600
commit accfe34604

View File

@ -37,12 +37,12 @@ const sortFunc = (sortParams: SortFuncParam) => {
if (typeof aValue === 'number') {
return aValue - bValue
}
return aValue < bValue ? 1 : -1
return aValue < bValue ? -1 : 1
}
if (typeof aValue === 'number') {
return bValue - aValue
}
return aValue > bValue ? 1 : -1
return aValue > bValue ? -1 : 1
})
}
const sort = (type?) => {