垂直居中
.v-center{
display: flex;
flex-direction: row;
align-items: center;
}
.v-center image{
width:100px;
height:100px;
}
.v-center text{
margin-left:10px;
}
<view class="v-center">
<image src="https://cdn-img.easyicon.net/image/2019/panda-index.svg"/>
<text>垂直居中</text>
</view>
view寬度根據內容自適應
.auto-width{
width: fit-content;
}