ant-design-vue icon indicating copy to clipboard operation
ant-design-vue copied to clipboard

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

Open hsbtr opened this issue 7 months ago • 2 comments
trafficstars

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

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

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

hsbtr avatar Mar 31 '25 02:03 hsbtr

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[bot] avatar Jun 10 '25 03:06 github-actions[bot]

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

hsbtr avatar Jun 10 '25 03:06 hsbtr

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[bot] avatar Aug 10 '25 03:08 github-actions[bot]