我试着展示菜谱的种类
<el-tag>
不过,它们都像一个在另一个下面:
我希望他们更像这样
这些标签在
<el-table>
它有这个结构
<el-table>
<el-table-column
prop="name"
label="Name">
</el-table-column>
<el-table-column
label="Category">
<template slot-scope="scope">
<div class="tag-container" v-for="cat in scope.row.categories">
<el-tag type="success">{{cat.name}}</el-tag>
</div>
</template>
</el-table-column>
<el-table-column
align="right">
<template slot="header" slot-scope="scope">
<el-input
v-model="search"
size="medium"
placeholder="Search"/>
</template>
<template slot-scope="scope">
<div class="btn-link-edit action-button" @click="edit(scope.row)">
<i class="fas fa-pencil-alt"></i>
</div>
<div class="btn-link-delete action-button" @click="remove(scope.row)">
<i class="fas fa-trash"></i>
</div>
</template>
</el-table-column>
</el-table>
我还创建了类
.tag-container {
display: flex;
flex-direction: row;
}
有没有办法让他们看起来像我展示的例子?