首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >在App.tsx中注册Vant的ActionSheet组件出现问题?

在App.tsx中注册Vant的ActionSheet组件出现问题?

提问于 2022-11-01 18:14:08
回答 0关注 0查看 162

我在App页面引入了一个vant的ActionSheet组件,运行项目是报错[Vue warn]: Invalid component name: “_Ctor”. Component names should conform to valid custom element name in html5 specification. 像是自己给ActionSheet组件命名了,代码简化如下:

代码语言:js
复制
import { Vue, Component } from 'vue-property-decorator'
import { ActionSheet } from 'vant'
@Component({
    components: { ActionSheet }
})
export default class App extends Vue {
    private render() {
        return (<div id="app">
            <ActionSheet> /* 静态元素*/</ActionSheet>
        </div>)
    }
}

控制台信息

代码语言:js
复制
[Vue warn]: Invalid component name: “_Ctor”. Component names should conform to valid custom element name in html5 specification.

其他页面也使用过ActionSheet没什么问题,不知道是不是App页面特殊一点。

很明显,我在这里没有命名任何东西_Ctor。为什么名称无效?如何选择有效的名称?

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档