Subscribe on changes!

子组件无法渲染全局组件UI

avatar
Aug 9th 2023

Vue version

3.2.40

Link to minimal reproduction

Steps to reproduce

import HomeFotter from './components/HomeFotter' // app.component('HomeFotter', HomeFotter) // 无效 app.component('home-fotter', HomeFotter) // 可正常使用

// HomeFotter.js import { h } from 'vue'; export default { render() { return h( 'div', { class: 'home_footer' }, 'hello world' ) } }

What is expected?

在子组件中使用使用PascalCase的形式和kebab-case的形式可以正常渲染UI

What is actually happening?

在子组件中使用使用PascalCase的形式可以正常渲染

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 Intel(R) Core(TM) i5-10500 CPU @ 3.10GHz    
    Memory: 4.13 GB / 15.83 GB
  Binaries:
    Node: 16.18.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.15 - C:\Program Files (x86)\Yarn\bin\yarn.CMD  
    npm: 8.19.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (115.0.1901.188)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    vue: ^3.2.40 => 3.3.4

Any additional comments?

暂时没有,求解决方案

avatar
Aug 9th 2023

image