Component template should contain exactly one root element

Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.

在同一个template里,不允许有多个根对象

类似于


<template>
    <div>
        <Breadcrumb>
            <Breadcrumb-item href="/">Home</Breadcrumb-item>
            <Breadcrumb-item href="/post/list">帖子</Breadcrumb-item>
            <Breadcrumb-item>帖子列表</Breadcrumb-item>
        </Breadcrumb>
        <Table border :columns="columns7" :data="data6"></Table>
    </div>

</template>

可以用个 div 或者其他元素将他们同时都包裹起来!

比如


<template>
    <div>
        <Breadcrumb>
            <Breadcrumb-item href="/">Home</Breadcrumb-item>
            <Breadcrumb-item href="/post/list">帖子</Breadcrumb-item>
            <Breadcrumb-item>帖子列表</Breadcrumb-item>
        </Breadcrumb>
        <Table border :columns="columns7" :data="data6"></Table>
    </div>

</template>

欢迎转载,但请附上原文地址哦,尊重原创,谢谢大家 本文地址: http://www.iphpt.com/detail/99/

当你能力不能满足你的野心的时候,你就该沉下心来学习