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

feat: editorTree & editorTabs support scroll into view #275

Merged
merged 5 commits into from
Jul 27, 2021
Merged

Conversation

mortalYoung
Copy link
Collaborator

@mortalYoung mortalYoung commented Jul 26, 2021

简介

  • editorTree 和 editorTabs 支持在新增或关闭 tab 的时候,会自动滚动到 active 的 tab 处

主要变更

  • 由于考虑到,如果把 Scrollable 组件做到 collapse 里面的话,会带来的问题有如下
    1. 子组件很难拿到 Scrollable 的实例,也就很难做 scrollTo
    2. CollapseScrollable 组件强耦合,如果有不需要 Scrollable 的子组件的话,就无法做到
  • 参考以上问题后,考虑把 ScrollableCollapse 做解耦,让需要的子组件自行引入 Scrollable 并做 scroll into view 的需求
  • 优化 Collapse 的计算函数,由于层级结构发生调整,所以按照原来的算法会拿到不准确的 content height ,也就会导致高度计算错误,故需要借助 data-* 来定位 content 节点
  • editorTreeeditorTabs 支持 scroll into view

Related Issues

Closed #230 Closed #278

@mortalYoung mortalYoung changed the title feat: editorTree support scroll into view feat: editorTree & editorTabs support scroll into view Jul 26, 2021
@mumiao mumiao merged commit 07b9a0f into main Jul 27, 2021
@mumiao mumiao deleted the feat/scrollable branch July 27, 2021 05:31
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.

Disable the Browser default scrolling styles feat: Scrollable support to scroll into view
2 participants