html - 如何使用ui元素在行中居中图标
问题描述
即使一个地址字符串比另一个长,我如何才能使这个编辑图标居中?
这是我遇到这个问题的专栏
<el-table-column
prop="address"
label="Address">
<template slot-scope="scope">
{{scope.row.address}}
<el-button
type="primary"
icon="el-icon-edit"
circle
size="mini"
style="margin-left: 55px"
@click="open(scope.$index, scope.row)"
></el-button>
</template>
</el-table-column>
这是完整的代码:
解决方案
<div style="display: flex">
<address style="flex-grow: 1"/>
<icon/>
</div>
推荐阅读
- next.js - NextJS、_app、SSG、getInitialProps 与 getStaticProps,我应该如何坚持 DRY?
- android - 带有 React 和 google auth 的 Ionic:idToken 在 android 中被截断
- sql - 使用 SQL 比较 2 个 url 主机名
- javascript - 在 Gatsby 中使用链接标签将样式注入 DOM
- python - Python Openpyxl:如何停止推理或覆盖单元格数据类型
- android - 如何使用设计略有不同的相同自定义视图?
- vba - VBA 将行数据移动到其相关工作表,但如果发现重复行,则跳过该行
- javascript - 获取参数并将其用作 Javascript 中的数组名称
- django - Django sum 对象过滤另一个模型
- javascript - 为什么我不能从 jsp 中的嵌入文件执行代码?