@anytestforpm/ocr 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -5
- package/ocr.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
# Install
|
|
2
2
|
npm i @anytestforpm/ocr
|
|
3
|
+
# Language Support
|
|
4
|
+
Region VN IN ID BR MM
|
|
3
5
|
# Usage Example
|
|
4
|
-
1.初始化OCR
|
|
6
|
+
1.初始化OCR的辨識語系及API路由設定,取得后台設定檔
|
|
5
7
|
```javascript
|
|
6
8
|
import { initOCR } from '@anytestforpm/ocr';
|
|
7
9
|
|
|
8
10
|
mounted() {
|
|
9
|
-
//
|
|
11
|
+
//initOCR
|
|
12
|
+
//@param {String} VN IN ID BR MM
|
|
13
|
+
//@param {String} API URL
|
|
10
14
|
if (process.env.NODE_ENV === 'production') {
|
|
11
|
-
initOCR('VN','https://your-api-domain');
|
|
15
|
+
initOCR('VN','https://your-api-domain/api/xxx');
|
|
12
16
|
} else {
|
|
13
|
-
initOCR('VN','https://your-api-domain');
|
|
17
|
+
initOCR('VN','https://your-api-domain/api/xxx');
|
|
14
18
|
}
|
|
15
19
|
},
|
|
16
20
|
```
|
|
@@ -49,7 +53,7 @@ try {
|
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
```
|
|
52
|
-
3
|
|
56
|
+
3.recognizeOCR(imgUrl) ,入參imgUrl
|
|
53
57
|
let ocrResData = await recognizeOCR(imgUrl);
|
|
54
58
|
mixins.js
|
|
55
59
|

|
package/ocr.js
CHANGED