欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

ScrollViewchildlayout(["alignItems"])錯誤

用React Native里的ScrollView組件,給ScrollView直接加了justifyContent或alignitems屬性后會報錯。

10年專注成都網(wǎng)站制作,企業(yè)網(wǎng)站建設(shè),個人網(wǎng)站制作服務(wù),為大家分享網(wǎng)站制作知識、方案,網(wǎng)站設(shè)計流程、步驟,成功服務(wù)上千家企業(yè)。為您提供網(wǎng)站建設(shè),網(wǎng)站制作,網(wǎng)頁設(shè)計及定制高端網(wǎng)站建設(shè)服務(wù),專注于企業(yè)網(wǎng)站建設(shè),高端網(wǎng)頁制作,對門窗定制等多個領(lǐng)域,擁有多年設(shè)計經(jīng)驗。

<ScrollView style={{alignItems:'center'}}>
<FlatList
data={this.state.sellData}
renderItem={({item})=><SellItem ordernum={item.orderNumber} time={item.time} memberid={item.memberId}
number={item.number} price={item.price} total_amount={item.total_amount}
sellCallBack={
()=>{
this.sellDba(item.orderId)
}
}
/>}
/>
</ScrollView>

報錯(ScrollView child layout ([“alignitems”, “justifyContent”]) must be applied through the contentContainerStyle prop)如下:
ScrollView child layout ([

(似乎是reactnative版本升級后的問題)問題原因是scrollView和flatlist之類的組件不支持直接添加這兩個屬性,解決方法是給組件添加contentContainerStyle屬性,這些樣式會應(yīng)用到一個內(nèi)層的內(nèi)容容器上,所有的子視圖都會包裹在內(nèi)容容器內(nèi),在這個屬性后面指定對應(yīng)的樣式即可:

<ScrollView contentContainerStyle={{alignItems:'center'}}>
<FlatList
data={this.state.sellData}
renderItem={({item})=><SellItem ordernum={item.orderNumber} time={item.time} memberid={item.memberId}
number={item.number} price={item.price} total_amount={item.total_amount}
sellCallBack={
()=>{
this.sellDba(item.orderId)
}
}
/>}
/>
</ScrollView>

文章名稱:ScrollViewchildlayout(["alignItems"])錯誤
本文路徑:http://chinadenli.net/article48/ipgjhp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供軟件開發(fā)面包屑導(dǎo)航全網(wǎng)營銷推廣網(wǎng)站制作網(wǎng)站導(dǎo)航虛擬主機

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

微信小程序開發(fā)