我有以下组件
组件
<template>
<!--<post-form/>-->
<div class="wrapper">
<b-table :data="posts">
<template slot-scope="props">
<b-table-column field="completed" label="complete">
<b-checkbox
v-model="props.row.done">
</b-checkbox>
</b-table-column>
</template>
</b-table>
</div>
</template>
我有一个带有 buefy 的 b-table。我想导入 <post-form />
来自当前组件的组件。
但是,当我将组件插入所需位置时,出现错误。
<div class="wrapping">
如果我在它下面放置一个组件,我的 table 就会坏掉。
我该如何解决这个问题?
最佳答案
也许你正在使用 Vue3,而你的 eslint 配置仍然是 vue 2。
尝试编辑您的 .eslintrc.json
或类似这样的内容:
{
// ...
"extends": ["eslint:recommended", "plugin:vue/vue3-essential"],
// ...
}
在此处查看引用资料:eslint-plugin-vue/#usage
关于html - Vue 错误 : "the template root requires exactly one element",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56199405/