浏览代码

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

zhangchao 4 年前
父节点
当前提交
ce2b80f9cc
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      autoHeightWebView/index.js

+ 2
- 2
autoHeightWebView/index.js 查看文件

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