flex佈局下要求內部元素為一行【uniapp】【伸手黨福利】
阿新 • • 發佈:2021-02-17
關鍵程式碼:
style="display: flex;flex-flow: row nowrap;"
示例:
<view class="flex align-center cu-item " style="margin: 10rpx;" @click="">
<view class="flex-twice" style="display: flex;flex-flow: row nowrap;" >
<view class="cuIcon-title text-orange" style="margin-left: 20rpx;"></view>
<view><b>標題最多64個字</b></view>
</view>
<view class="flex-sub text-gray " style="display: inline;">
< view style="float:right;margin-right: 10rpx;">
<radio :class="form.radioChoosed=='B'?'checked':''" :checked="form.radioChoosed=='B'?true:false" value="B"></radio>
</view>
</view>
</view>
效果: