Просмотр исходного кода

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

zhangchao 4 лет назад
Родитель
Сommit
04b7f16f1e
No account linked to committer's email address
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 || 20 }]}>
70
+      <View style={[props.style, { height: height || 20, 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}