Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复:表格右上角自定义列与自定义列排序 #415

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

coolhihi
Copy link

Fix sort and toggle in tableSetting.

Types of changes

  • New feature
  • Bug fix
  • Documentation change
  • Coding style change
  • Refactoring
  • Performance improvement
  • Test cases
  • Continuous integration
  • Typescript definition change
  • Breaking change

Background and context

list/search-table/index.vue
该示例表格右上角提供自选显示列和自定义列排序,但有缺憾:
1、当取消多个勾时实际只取消最后一个,重新勾上会导致出现重复列。
2、排序算法与drag的页面效果不符,页面显示效果是其他字段前移或后移,但代码结果是前后位置的两个列直接交换。

Solution

1、使用showColumns作为母本直接重新生成列配置
2、使用splice方式把旧下标的元素插入新下标前,取代原来交换的方式

How is the change tested?

本地dev测试

Changelog

Changelog(CN) Changelog(EN) Related issues
修复示例表格search-table右上角提供的自选显示列和自定义列排序 fixed problem about sort and toggle column in search-table page.

Checklist:

  • Provide changelog for relevant changes (e.g. bug fixes and new features) if applicable.
  • Changes are submitted to the appropriate branch (e.g. features should be submitted to feature branch and others should be submitted to master branch)

Other information

Fix sort and toggle in tableSetting.
@coolhihi coolhihi changed the title Update index.vue 修复:表格右上角自定义列与自定义列排序 Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant