Browse Source

修复透明背景色无效

zhangchao 4 years ago
parent
commit
0ee992ed00
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      autoHeightWebView/index.js

+ 1
- 1
autoHeightWebView/index.js View File

70
       <View style={[props.style, { height: height || 50, transform: [{ translateX: -1 }] }]}>
70
       <View style={[props.style, { height: height || 50, transform: [{ translateX: -1 }] }]}>
71
         <WebView
71
         <WebView
72
           {...props}
72
           {...props}
73
-          style={{ transform: [{ translateX: 1 }] }}
73
+          style={{ transform: [{ translateX: 1 }], backgroundColor: '#0000' }}
74
           ref={webView}
74
           ref={webView}
75
           onMessage={handleMessage}
75
           onMessage={handleMessage}
76
           injectedJavaScript={script}
76
           injectedJavaScript={script}