简书链接:uniapp封装button导致flex不正常摆放问题记录
文章字数:49,阅读全文大约需要1分钟

1
2
3
4
5
6
<view style="display: flex; margin-bottom: 10px;  justify-content: space-between; align-items: center; width: 100%;  flex-direction: row;">

<checkbox :value="detail" activeBorderColor="#005fff" style="margin-left: 10px;"> 明细</checkbox>
<button size="mini" style="position: absolute;right: 10px;" @click="onRefresh()">查询</button>
</view>

正常来说不需要用到position: absolute;right: 10px;就会在右边,但是实际上并不是如此,除非不用button