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(components): [menu] export MenuInstance #14284

Merged
merged 3 commits into from
Sep 16, 2023
Merged

fix(components): [menu] export MenuInstance #14284

merged 3 commits into from
Sep 16, 2023

Conversation

HeftyKoo
Copy link
Member

@HeftyKoo HeftyKoo commented Sep 14, 2023

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

  • 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 1c784a4

This pull request refactors the menu component and its subcomponents to use a consistent naming convention and export their types. This makes the menu component easier to use and bundle with TypeScript.

Related Issue

Fixes #___.

Explanation of Changes

🤖 Generated by Copilot at 1c784a4

  • Export menu component's subcomponent types as aliases (link)
  • Rename menu component's default export to ElMenu and export it as a named export (link)
  • Define and export a type alias for menu component's instance with additional methods (link)

@github-actions
Copy link

github-actions bot commented Sep 14, 2023

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

github-actions bot commented Sep 14, 2023

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

@btea
Copy link
Collaborator

btea commented Sep 15, 2023

Maybe we can create a separate instance.ts file-like button.
https://github.com/element-plus/element-plus/blob/dev/packages/components/button/src/instance.ts

@HeftyKoo HeftyKoo merged commit 0f26990 into dev Sep 16, 2023
10 checks passed
@HeftyKoo HeftyKoo deleted the HeftyKoo/issue14251 branch September 16, 2023 01:25
@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
* fix(components): [menu] export MenuInstance

closed element-plus#14251

* chore: export other component instance

* refactor: extract instace type to instance file
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.

[TypeScript] [menu] ElMenu 实例没有 open 方法
3 participants