Ver código fonte

修复设置右边距会出现黑条的bug

zhangchao 5 anos atrás
pai
commit
04b7f16f1e
Nenhuma conta vinculada ao e-mail do autor do commit
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2
    2
      autoHeightWebView/index.js

+ 2
- 2
autoHeightWebView/index.js Ver arquivo

67
       [width, height, onSizeUpdated]
67
       [width, height, onSizeUpdated]
68
     );
68
     );
69
     return (
69
     return (
70
-      <View style={[props.style, { height: height || 20 }]}>
70
+      <View style={[props.style, { height: height || 20, transform: [{ translateX: -1 }] }]}>
71
         <WebView
71
         <WebView
72
           {...props}
72
           {...props}
73
-          style={{}}
73
+          style={{transform: [{ translateX: 1 }]}}
74
           ref={webView}
74
           ref={webView}
75
           onMessage={handleMessage}
75
           onMessage={handleMessage}
76
           injectedJavaScript={script}
76
           injectedJavaScript={script}