我配置了'i-tab-pane': Tabpane
但是报告错误,代码如下:
<template>
<div class="page-common">
<i-tabs>
<i-tab-pane label="wx">
content
</i-tab-pane>
</i-tabs>
</div>
</template>
<script>
import {
Tabs,
Tabpane
} from 'iview'
export default{
name:"data-center",
data(){
return {msg: 'hello vue'}
},
components: {
'i-tabs' : Tabs,
'i-tab-pane': Tabpane
}
}
</script>
错误回溯:
[Vue warn]: Unknown custom element: <i-tab-pane> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> <DataCenter> at src/views/dc/data-center.vue
<Index> at src/views/index.vue
<App> at src/app.vue
我已经尝试在main.js
全局配置中:
Vue.component("Tabpane", Tabpane);
但仍然无法正常工作。如何解决这个问题?
添加我的场景。以防万一有人遇到类似问题并且无法识别实际问题。
我正在使用Vue Splitpanes。
以前,它仅需要“ Splitpanes”,在最新版本中,他们制作了另一个“ Pane”组件(作为splitpanes的子代)。
现在的事情是,如果您没有在最新版的分割窗格中注册“ Pane”组件,则显示“ Splitpanes”错误。如下。