unplugin-vue-components icon indicating copy to clipboard operation
unplugin-vue-components copied to clipboard

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

Open rainmanhhh opened this issue 3 years ago • 3 comments

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.

rainmanhhh avatar Jun 17 '22 09:06 rainmanhhh

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>

nabaonan avatar Jun 21 '22 14:06 nabaonan

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

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

rainmanhhh avatar Jun 23 '22 07:06 rainmanhhh

[ component name must be a-page-header, which ide? try it with Volar plugin.

nabaonan avatar Jun 23 '22 15:06 nabaonan

我用的是idea(webstorm同理)

rainmanhhh avatar Jun 24 '22 07:06 rainmanhhh