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

refactor(components): [tabs] enhance instance type #14352

Merged
merged 2 commits into from
Sep 22, 2023
Merged

Conversation

HeftyKoo
Copy link
Member

@HeftyKoo HeftyKoo commented Sep 21, 2023

  1. exports Tabs instance type

  2. add expose type to TabNavInstanec

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow contributing guide English | (中文 | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer to relative issues for your PR.

Description

🤖 Generated by Copilot at 036975d

Improved the type definitions and circular dependency handling of the Tabs and TabNav components. Added a currentName property to Tabs and exposed two methods from TabNav to control scrolling and focus.

Related Issue

Fixes #___.

Explanation of Changes

🤖 Generated by Copilot at 036975d

  • Expose scrollToActiveTab and removeFocus methods from TabNav component to allow parent Tabs component to control scrolling and focus behavior (link, link, link)
  • Assign Tabs component to a constant and export it as default to avoid circular dependency issue with TabNav component, which imports the Tabs type (link, link)
  • Add and export TabsInstance type to extend the instance type of Tabs component with a currentName property, which reflects the name of the active tab pane (link)

1. exports Tabs instance type

2. add expose type to TabNavInstanec
@github-actions
Copy link

github-actions bot commented Sep 21, 2023

@github-actions github-actions bot added the CommitMessage::Qualified Qualified commit message label Sep 21, 2023
@github-actions
Copy link

🧪 Playground Preview: https://element-plus.run/?pr=14352
Please comment the example via this playground if needed.

@HeftyKoo HeftyKoo merged commit bfff514 into dev Sep 22, 2023
10 checks passed
@HeftyKoo HeftyKoo deleted the refactor-tabs-instance branch September 22, 2023 02:20
@element-bot element-bot mentioned this pull request Oct 13, 2023
3 tasks
consultation-applio pushed a commit to consultation-applio/element-plus that referenced this pull request Nov 10, 2023
* refactor(components): [tabs] enhance instance type

1. exports Tabs instance type

2. add expose type to TabNavInstanec

* chore: remove useless import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CommitMessage::Qualified Qualified commit message
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants