gpt4 book ai didi

css - 在 Material VueJS 的 上使用 样式未对齐

转载 作者:行者123 更新时间:2023-11-27 23:28:30 27 4
gpt4 key购买 nike

我想将操作放在同一数据行上,我有两个操作,为此我使用按钮和图标作为下面的代码。

    <md-table v-model="gruposDeInsumos" md-sort="codigo" md-sort-order="asc" md-card>
<md-table-row slot="md-table-row" slot-scope="{item}">
<md-table-cell class="item-codigo" md-label="Código" md-sort-by="codigo"> {{item.codigo}}</md-table-cell>
<md-table-cell class="item-nome" md-label="Nome" md-sort-by="nome"> {{item.nome}}</md-table-cell>
<md-table-cell md-label="Tipo" md-sort-by="tipo"> {{item.tipo === 'products' ? 'Produtos' : 'Serviços'}}</md-table-cell>
<md-table-cell md-label="Ações">
<md-button>
<md-icon>edit</md-icon>
</md-button>
<md-button>
<md-icon>delete</md-icon>
</md-button>
</md-table-cell>
</md-table-row>
</md-table>

结果是:

enter image description here

如您所见,同一表格行上有两行,这是在我添加了两个操作按钮(编辑和删除)之后发生的。那么,我如何修复它以使这些组件保持在同一行?

除此之外,如果有人知道,我该如何选择 <md-icon>颜色?

最佳答案

您可以使用自己的 CSS 并应用包含 display:flex 属性的类。或者您可以阅读他们的文档并使用他们的列语法。他们可能有一些类来添加列。

关于css - 在 Material VueJS 的 <md-table-cell> 上使用 <md-button> 和 <md-icon> 样式未对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57618075/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com