Explorar el Código

Fix comments of path issue of baseUrl

iou90 hace 4 años
padre
commit
a09a7a8856
Se han modificado 2 ficheros con 6 adiciones y 6 borrados
  1. 3
    3
      README.md
  2. 3
    3
      autoHeightWebView/index.js

+ 3
- 3
README.md Ver fichero

@@ -39,8 +39,8 @@ import { Dimensions } from 'react-native'
39 39
     /*
40 40
     using local or remote files
41 41
     to add local files:
42
-    add baseUrl/files... to android/app/src/assets/ on android
43
-    add baseUrl/files... to project root on iOS
42
+    add files to android/app/src/main/assets/ (depends on baseUrl) on android
43
+    add files to web/ (depends on baseUrl) on iOS
44 44
     */
45 45
     files={[{
46 46
         href: 'cssfileaddress',
@@ -52,7 +52,7 @@ import { Dimensions } from 'react-native'
52 52
     // 'file:///android_asset/web/' by default on Android
53 53
     // or uri
54 54
     source={{ html: `<p style="font-weight: 400;font-style: normal;font-size: 21px;line-height: 1.58;letter-spacing: -.003em;">Tags are great for describing the essence of your story in a single word or phrase, but stories are rarely about a single thing. <span style="background-color: transparent !important;background-image: linear-gradient(to bottom, rgba(146, 249, 190, 1), rgba(146, 249, 190, 1));">If I pen a story about moving across the country to start a new job in a car with my husband, two cats, a dog, and a tarantula, I wouldn’t only tag the piece with “moving”. I’d also use the tags “pets”, “marriage”, “career change”, and “travel tips”.</span></p>` }}
55
-    // false by default on Android (different from react-native-webview),
55
+    // false by default on iOS & Android (different from react-native-webview which true by default on Android),
56 56
     // when scalesPageToFit was assigned to true, it will apply page scale to size directly instead of using viewport meta script 
57 57
     scalesPageToFit={true}
58 58
     // only works on iOS when scalesPageToFit was false,

+ 3
- 3
autoHeightWebView/index.js Ver fichero

@@ -89,8 +89,8 @@ const AutoHeightWebView = React.memo(
89 89
 
90 90
 AutoHeightWebView.propTypes = {
91 91
   onSizeUpdated: PropTypes.func,
92
-  // add baseUrl/files... to android/app/src/assets/ on android
93
-  // add baseUrl/files... to project root on iOS
92
+  // add files to android/app/src/main/assets/ (depends on baseUrl) on android
93
+  // add files to web/ (depends on baseUrl) on iOS
94 94
   files: PropTypes.arrayOf(
95 95
     PropTypes.shape({
96 96
       href: PropTypes.string,
@@ -107,7 +107,7 @@ AutoHeightWebView.propTypes = {
107 107
   onMessage: PropTypes.func,
108 108
   // baseUrl now contained by source
109 109
   // 'web/' by default on iOS
110
-  // 'file:///android_asset/web/' by default on Android
110
+  // 'file:///android_asset/' by default on Android
111 111
   source: PropTypes.object
112 112
 };
113 113