unplugin / unplugin-vue-components

📲 On-demand components auto importing for Vue
https://www.npmjs.com/package/unplugin-vue-components
MIT License
3.75k stars 348 forks source link

ant-design-vue PageHeader无法自动导入 #424

Open rainmanhhh opened 2 years ago

rainmanhhh commented 2 years ago

ide中输入APageheader可以自动补全,但实际运行时页面不显示该组件,控制台有警告

runtime-core.esm-bundler.js:38 

       [Vue warn]: Failed to resolve component: APageheader
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
nabaonan commented 2 years ago

use it like this

<template>
  <a-page-header style="border: 1px solid rgb(235, 237, 240)" title="Title" sub-title="This is a subtitle"
    @back="() => null" />
</template>
<script lang="ts">
import { defineComponent, onMounted, ref } from 'vue';

export default defineComponent({
  setup() {

  },
});
</script>
rainmanhhh commented 2 years ago

[Vue warn]: Failed to resolve component: a-pageheader

如果手动强行改为a-page-header,则ide提示Unknown html tag a-page-header

rainmanhhh commented 2 years ago

我用的是idea(webstorm同理)