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

fix: transfer、transferPicker分页和搜索相关的问题修复和优化 #9195

Closed
wants to merge 28 commits into from

Conversation

weien601
Copy link
Contributor

What

  1. 新增TransferPicker的分页支持

  2. 修复Transfer组件开发分页时,搜索不支持分页的问题

  3. 新增TransferPicker和TabsTransferPicker支持placeholder配置项

  4. 修复TabsTransfer在多tab状态下搜索问题

  5. Transfer组件及相关的Tabs和Picker,增加tree模式下的initiallyOpen支持

  6. 修复CRUD组件在loading状态下按钮仍然可以触发操作

Why

  1. 在3.6.1版本Transfer新增了分页功能,但是TransferPicker以及TabsTransferPicker并不支持

  2. Transfer组件在开启分页和搜索时,用户进行搜索操作;请求接口搜索到结果时页码组件并未刷新,仍然使用默认数据的分页而不是使用搜索结果的分页

  3. TransferPicker和TabsTransferPicker目前并不支持配置placeholder,作为表单的组件应该统一支持这个配置项

  4. 在TabsTransfer组件下,如果数据是静态的、多个tabs并且开启了搜索,当用户停留在某个tab下时,搜索出来的内容时全部tab的,而且内容显示错乱

  5. Transfer组件在tree模式下,当前默认是展开所有选项的,而用户可能会出现数据量过多默认需要收起的情况,所以希望新增tree组件的initiallyOpen配置项来支持

  6. CRUD组件在加载中状态时所有按钮本应该被遮罩住的,但是发现代码有关于遮罩会导致弹层被影响所以去掉了按钮的遮罩,导致用户可以加载中时操作按钮重复触发行为

How

  1. 参考Transfer的实现方式,差别的地方是在TransferPicker中选择选项并不会直接修改表单值,必须在用户点击确定后,所以这里在组件中新增了临时状态存储。
    提交编号: 71192e5
    临时状态在每次确定或者取消时清理
    提交编号: 6ae1a56

  2. Transfer组件新增搜索分页的存储和分页逻辑。
    提交编号: 6ae1a56

  3. placeholder配置转递给UI组件
    提交编号: 33c30d5

  4. 修复成只能搜索到当前tab下的数据
    提交编号: f0e1757

  5. 修改Transfer、TransferPicker、TabsTransferPicker将initiallyOpen传递给tree组件
    提交编号: 5791ae3

  6. 因为不熟悉被注解掉的代码影响范围不好去修复该问题,所以使用临时解决方案,在用户点击按钮时发现是加载中时跳出逻辑
    提交编号: 01c4c63

@github-actions github-actions bot added the fix label Dec 20, 2023
Copy link

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@lurunze1226
Copy link
Collaborator

rebase一下master吧,这里不应该有其他人的提交
image

This reverts commit e7c6fd8.
@weien601 weien601 closed this Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants