Skip to content

feat: 将导出的组件加上前缀,无需手动按需导入时重命名 #8106

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hsbtr
Copy link

@hsbtr hsbtr commented Mar 31, 2025

现在的组件使用的时候有两种方式,自动导入与手动导入; 但手动导入需要在导入的时候重新命名,如:

<script setup>
import { Form as AForm } from ''ant-design-vue'
</script>
<template>
  <a-form></a-form>
</template>

不如此使用的话,小写使用就会与关键字冲突,所以我在库的内部改变了每个组件导出的名字,自动导入或全局注册会造成组件无法读取到声明,开发过程中这样很难通过组件直接转入到组件声明文件

Copy link

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the Stale label Jun 10, 2025
@hsbtr
Copy link
Author

hsbtr commented Jun 10, 2025

不使用全局注册或者自动按需导入插件,而是由开发在业务组件中声明清楚使用的组件库来自何处这个不是更利于团队开发吗,官方如果看到的话还是希望可以解惑一下

@github-actions github-actions bot removed the Stale label Jun 11, 2025
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.

1 participant