@cpzxrobot/sdk 1.0.6 → 1.0.7
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/index.ts +4 -4
- package/package.json +1 -1
- package/types.d.ts +3 -2
package/index.ts
CHANGED
|
@@ -31,9 +31,9 @@ export class Cpzxrobot {
|
|
|
31
31
|
_getSelectedFarmFromMiniApp!: () => any;
|
|
32
32
|
_getSelectedUnitFromMiniApp!: () => any;
|
|
33
33
|
_jumpToMiniApp!: (url: string) => any;
|
|
34
|
-
setTitle:
|
|
35
|
-
saveBase64
|
|
36
|
-
saveBlob
|
|
34
|
+
setTitle!: (title: string) => void;
|
|
35
|
+
saveBase64!: (base64: string, filename: string) => void;
|
|
36
|
+
saveBlob!: (blob: Blob, filename: string) => void;
|
|
37
37
|
assistant: AssistantGateway;
|
|
38
38
|
energy: EnergyGateway;
|
|
39
39
|
camera: CameraGateway;
|
|
@@ -140,7 +140,7 @@ export class Cpzxrobot {
|
|
|
140
140
|
return platform.callHandler("app.openMiniapp", url);
|
|
141
141
|
};
|
|
142
142
|
this.setTitle = function (title: string) {
|
|
143
|
-
|
|
143
|
+
platform.callHandler("app.setTitle", title);
|
|
144
144
|
};
|
|
145
145
|
this.saveBlob = this._saveBlobAsBase64;
|
|
146
146
|
this.saveBase64 = function (base64: string, filename: string) {
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -132,8 +132,9 @@ export class Cpzxrobot {
|
|
|
132
132
|
axios: MyAxiosInstance;
|
|
133
133
|
_getSelectedFarmFromMiniApp: () => Promise<Factory>;
|
|
134
134
|
_getSelectedUnitFromMiniApp: () => Promise<Unit>;
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
setTitle: (title: string) => void;
|
|
136
|
+
saveBase64: (base64: string, filename: string) => void;
|
|
137
|
+
saveBlob: (blob: Blob, filename: string) => void;
|
|
137
138
|
}
|
|
138
139
|
|
|
139
140
|
declare global {
|