FlexBoxLayout自对齐:flex端在nativescript-vue中不工作



在我的nativescript-vue应用程序中,我正在使用flex布局来创建一个自定义ActionBar组件以重复使用,我正在尝试将搜索图标与行的末尾对齐,使用align self:flex end会很容易,但它对我不起作用,老实说,我是nativescript的新手,整个布局非常不稳定。。。

https://i.stack.imgur.com/yQgWk.png

这是我的代码:

<FlexboxLayout style="width:100%; height:auto; flex-direction:column; align-items:flex-start; justify-content:center;">
<FlexboxLayout style="width:100%; height:85px; padding:0px 10px; background-color:blue;  flex-direction:row; justify-content:flex-start; align-items:center;">
<Label :text="'fa-bars' | fonticon" class="fa c_light" style="font-size:25; margin:0 10;"/>
<Label text="Pacome" fontSize="24" class="c_light" style="margin:0 10;"/>
<!--THIS SHOULD BE ALIGNED TO THE RIGHT-->
<Label :text="'fa-search' | fonticon" class="fa c_light" style="font-size:25; margin:0 10; align-self:flex-end;"/>
</FlexboxLayout >
</FlexboxLayout >

我遇到了同样的问题,这就解决了它。将order属性添加到子级:order=0order=1

最新更新