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: support component and directive in same name #440

Merged
merged 2 commits into from Jul 1, 2022

Conversation

azaleta
Copy link
Contributor

@azaleta azaleta commented Jun 29, 2022

fix #364

Use a prefix to seprate directive name from the component

generated dts file will be like

import '@vue/runtime-core'

declare module '@vue/runtime-core' {
  export interface GlobalComponents {
    InfiniteScroll: typeof import('./src/components/InfiniteScroll/index.vue')['default']
    'V-InfiniteScroll': typeof import('element-plus/es')['ElInfiniteScroll']
  }
}

export {}

@azaleta azaleta requested a review from antfu as a code owner June 29, 2022 13:59
@azaleta azaleta changed the title feat:support component and directive in same name feat: support component and directive in same name Jun 29, 2022
@antfu antfu requested a review from sxzz June 30, 2022 02:27
@sxzz sxzz enabled auto-merge (squash) June 30, 2022 22:07
@sxzz sxzz disabled auto-merge June 30, 2022 22:07
src/core/constants.ts Outdated Show resolved Hide resolved
src/core/constants.ts Outdated Show resolved Hide resolved
@sxzz sxzz merged commit f161f50 into unplugin:main Jul 1, 2022
@azaleta azaleta deleted the directive branch July 1, 2022 05:27
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.

当组件名和自定义指令名重名时无法正常使用该指令(Vite+Vue3+ElementPlus)
2 participants