在nativescript vue的FlexboxLayout中将标签居中
在flexbox布局中,我希望在左侧有一个图像,在右侧有一个中心标签标题:在nativescript vue的FlexboxLayout中将标签居中,nativescript,nativescript-vue,Nativescript,Nativescript Vue,在flexbox布局中,我希望在左侧有一个图像,在右侧有一个中心标签标题: <FlexboxLayout backgroundColor="#bada55" justifyContent="space-between" height="300" class="head"> <Image :src="posts.image_url" stretch="aspectFit" class="head_img"/> <Label :text="posts
<FlexboxLayout backgroundColor="#bada55" justifyContent="space-between" height="300" class="head">
<Image :src="posts.image_url" stretch="aspectFit" class="head_img"/>
<Label :text="posts.product_name" alignSelf="center" alignContent="center" class="title" textWrap="true"/>
</FlexboxLayout>
在我的例子中,标签文本是向右的,但不是居中的,你知道怎么做吗?你可以在标签上添加
textAlignment=“center”
<FlexboxLayout backgroundColor="#bada55" justifyContent="space-between" height="300" class="head">
<Image :src="posts.image_url" stretch="aspectFit" class="head_img"/>
<Label :text="posts.product_name" alignSelf="center" alignContent="center" textAlignment="center" class="title" textWrap="true"/>
</FlexboxLayout>
我不明白你想要什么。“右边中间的标签标题”?你能用你拥有的和你想要的截图来编辑你的问题吗?