vue3 函数式组件调试报警 make sure to add a “displayName” to the component

2022-12-07 13:38:42 浏览数 (2)

开发调试报警

If you were passing a functional component, make sure to add a “displayName” to the component.

解决

代码语言:javascript复制
const component = () => {
    return h(
        MyComponent
    )
}
component.displayName = 'MyComponentWrapper'

0 人点赞