vxe-table中<vxe-grid>组件中表格数据排序问题sort-change

问题描述,首先使用vxe-grid虚拟列表为了同时渲染大批量数据的,但是从iview ui里的table和element ui 里table都是只能渲染少量数据,达不到大批量数据渲染,所以改用vxe-grid。

但是有个排序的问题在iview ui和element ui 里table都不会存在排序混乱的问题,而vxe-grid里的排序会有问题,最终在不懈努力下解决了

vxe-table中<vxe-grid>组件中表格数据排序问题sort-change_第1张图片
排序有问题,代码是这样写的
vxe-table中<vxe-grid>组件中表格数据排序问题sort-change_第2张图片

解决之后

vxe-table中<vxe-grid>组件中表格数据排序问题sort-change_第3张图片

// sortable: ‘custom’, // sortable: true 这两种方法都可以,但是不能用slots去渲染数据
在数据源哪里处理数据就可以了

	{
          title: 'reviews',
          field: 'reviews',
          className: 'noPadding',
          align: 'center',
          sortable: true,
          // sortable: 'custom', // sortable: true 这两种方法都可以,但是不能用slots去渲染数据
          width: 90
     },

vxe-table中<vxe-grid>组件中表格数据排序问题sort-change_第4张图片
vxe-table中<vxe-grid>组件中表格数据排序问题sort-change_第5张图片

你可能感兴趣的:(iview,ui,table,前端,ui)