@cpzxrobot/sdk 1.0.9 → 1.0.10
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/dist/index.js +2 -1
- package/index.ts +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -67,10 +67,11 @@ class Cpzxrobot {
|
|
|
67
67
|
}
|
|
68
68
|
_saveBlobAsBase64(blob, filename) {
|
|
69
69
|
const reader = new FileReader();
|
|
70
|
+
var that = this;
|
|
70
71
|
reader.onload = function () {
|
|
71
72
|
const base64 = reader.result;
|
|
72
73
|
// @ts-ignore
|
|
73
|
-
|
|
74
|
+
that.saveBase64(base64, filename);
|
|
74
75
|
};
|
|
75
76
|
reader.readAsDataURL(blob);
|
|
76
77
|
}
|
package/index.ts
CHANGED
|
@@ -92,10 +92,11 @@ export class Cpzxrobot {
|
|
|
92
92
|
|
|
93
93
|
_saveBlobAsBase64(blob: Blob, filename: string) {
|
|
94
94
|
const reader = new FileReader();
|
|
95
|
+
var that = this;
|
|
95
96
|
reader.onload = function () {
|
|
96
97
|
const base64 = reader.result as string;
|
|
97
98
|
// @ts-ignore
|
|
98
|
-
|
|
99
|
+
that.saveBase64(base64, filename);
|
|
99
100
|
};
|
|
100
101
|
reader.readAsDataURL(blob);
|
|
101
102
|
}
|