瀏覽代碼

width不生效

tags/jenkins-front-end-screenad-216-v119^0
caserKing 5 年之前
父節點
當前提交
aabe4456d8
共有 1 個檔案被更改,包括 6 行新增4 行删除
  1. +6
    -4
      App.js

+ 6
- 4
App.js 查看文件

@@ -627,6 +627,8 @@ getAdView(){
</ImageBackground>
);
} else if (this.state.adType == 2) {
let curWidthNum = 394*PixelRatio.get();

return (
// <ImageBackground style={styles.adTypeBg} source={require('./image/ad1.jpg')}>
<ImageBackground style={styles.adTypeBg} resizeMode="stretch" source={{ uri: this.state.curCoverImgUrl}}>
@@ -640,8 +642,8 @@ getAdView(){
ref={'carousel'}
data={adDataList}
renderItem={this.setSwiperItemDom}
sliderWidth={394*PixelRatio.get()}
itemWidth={394*PixelRatio.get()}
sliderWidth={curWidthNum}
itemWidth={curWidthNum}
itemHeight={134}
sliderHeight={134}
activeSlideOffset={0}
@@ -1175,8 +1177,8 @@ MyPage = CodePush(codePushOptions)(MyPage);

contentItemTopForAd:{
flex: 1,
width: 1127/PixelRatio.get(),
// width: '100%',
// width: 1127/PixelRatio.get(),
width: '100%',
height:'100%',
paddingLeft: 22/PixelRatio.get(),
paddingRight: 26/PixelRatio.get(),


Loading…
取消
儲存