fix(查询组件): 自定义排序不生效

This commit is contained in:
dataeaseShu 2024-11-19 15:09:40 +08:00
parent 84875801c6
commit fcdf117799

View File

@ -290,9 +290,11 @@ const setOldMapValue = arr => {
const customSort = () => {
if (config.value.sortList?.length && config.value.sort === 'customSort') {
options.value.sort(
(a, b) => config.value.sortList.indexOf(a.value) - config.value.sortList.indexOf(b.value)
)
options.value = [
...options.value.sort(
(a, b) => config.value.sortList.indexOf(a.value) - config.value.sortList.indexOf(b.value)
)
]
}
}