njleonzhang / vue-data-tables

A simple, customizable and pageable table with SSR support, based on vue2 and element-ui
https://njleonzhang.github.io/vue-data-tables
MIT License
1.02k stars 221 forks source link

服务端排序,点击多次同一个排序列,发现传参post里的sort的prop和order都是null值 #206

Closed yingjie-design closed 5 years ago

yingjie-design commented 5 years ago

Online reproduce

It is important to provide an online sample to reproduce the issue.

Expected Behavior

服务端排序,点击多次同一个排序列,发现传参post里的sort的prop和order都是null值 #205

{type: "sort", page: 1, pageSize: 5, sort: {prop: null, order: null}, filters: []} filters: [] page: 1 pageSize: 5 sort: {prop: null, order: null} type: "sort"

操作:就是正常点击正序,点击倒序,点击正序,如此几次,就出现了null,求解

Current Behavior

Steps to Reproduce

Detailed Description

For feature request, provide the following section

Motivation / Use Case

Expected Behavior

Other Information

yingjie-design commented 5 years ago

演示站jsfiddle 的server演示同样存在问题,多点几次

njleonzhang commented 5 years ago

@songbambi element-ui 的排序逻辑是 3 次,第一次点升序,第二次点降序,再点就是不用这列排序, prop 和 order 就会是 null.

yingjie-design commented 5 years ago

感谢