@weapp-vite/web 1.3.16 → 1.3.18
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 +2 -2
- package/dist/compiler/wxml/attributes.mjs +6 -6
- package/dist/compiler/wxml/attributes.mjs.map +1 -1
- package/dist/compiler/wxml/renderer.mjs +6 -6
- package/dist/compiler/wxml/renderer.mjs.map +1 -1
- package/dist/compiler/wxml/specialNodes.mjs +6 -5
- package/dist/compiler/wxml/specialNodes.mjs.map +1 -1
- package/dist/plugin/files.mjs +1 -1
- package/dist/plugin/files.mjs.map +1 -1
- package/dist/runtime/component/constants.mjs +7 -2
- package/dist/runtime/component/constants.mjs.map +1 -1
- package/dist/runtime/component/dom.mjs +9 -3
- package/dist/runtime/component/dom.mjs.map +1 -1
- package/dist/runtime/component/events.mjs +5 -4
- package/dist/runtime/component/events.mjs.map +1 -1
- package/dist/runtime/legacyTemplate/dom.mjs +10 -65
- package/dist/runtime/legacyTemplate/dom.mjs.map +1 -1
- package/dist/runtime/legacyTemplate/index.mjs +7 -6
- package/dist/runtime/legacyTemplate/index.mjs.map +1 -1
- package/dist/runtime/polyfill/async.mjs +3 -3
- package/dist/runtime/polyfill/async.mjs.map +1 -1
- package/dist/runtime/polyfill/authApi.mjs +16 -16
- package/dist/runtime/polyfill/authApi.mjs.map +1 -1
- package/dist/runtime/polyfill/background.mjs +4 -4
- package/dist/runtime/polyfill/background.mjs.map +1 -1
- package/dist/runtime/polyfill/capability.mjs +6 -3
- package/dist/runtime/polyfill/capability.mjs.map +1 -1
- package/dist/runtime/polyfill/cloud.mjs +3 -3
- package/dist/runtime/polyfill/cloud.mjs.map +1 -1
- package/dist/runtime/polyfill/deviceApi.mjs +5 -5
- package/dist/runtime/polyfill/deviceApi.mjs.map +1 -1
- package/dist/runtime/polyfill/deviceAuthSystemApi.d.mts +2 -2
- package/dist/runtime/polyfill/deviceAuthSystemApi.mjs.map +1 -1
- package/dist/runtime/polyfill/fileSystemManager.mjs +7 -7
- package/dist/runtime/polyfill/fileSystemManager.mjs.map +1 -1
- package/dist/runtime/polyfill/index.mjs +21 -10
- package/dist/runtime/polyfill/index.mjs.map +1 -1
- package/dist/runtime/polyfill/interactionApi.mjs +8 -8
- package/dist/runtime/polyfill/interactionApi.mjs.map +1 -1
- package/dist/runtime/polyfill/locationApi.mjs +21 -21
- package/dist/runtime/polyfill/locationApi.mjs.map +1 -1
- package/dist/runtime/polyfill/mediaApi/file.mjs +12 -12
- package/dist/runtime/polyfill/mediaApi/file.mjs.map +1 -1
- package/dist/runtime/polyfill/mediaApi/info.mjs +7 -7
- package/dist/runtime/polyfill/mediaApi/info.mjs.map +1 -1
- package/dist/runtime/polyfill/mediaApi/picker.mjs +11 -11
- package/dist/runtime/polyfill/mediaApi/picker.mjs.map +1 -1
- package/dist/runtime/polyfill/mediaApi/preview.mjs +7 -7
- package/dist/runtime/polyfill/mediaApi/preview.mjs.map +1 -1
- package/dist/runtime/polyfill/mediaApi/process.mjs +6 -6
- package/dist/runtime/polyfill/mediaApi/process.mjs.map +1 -1
- package/dist/runtime/polyfill/menuApi.mjs +13 -13
- package/dist/runtime/polyfill/menuApi.mjs.map +1 -1
- package/dist/runtime/polyfill/navigationBarRuntime.mjs +5 -4
- package/dist/runtime/polyfill/navigationBarRuntime.mjs.map +1 -1
- package/dist/runtime/polyfill/network/requestBridge.mjs +7 -7
- package/dist/runtime/polyfill/network/requestBridge.mjs.map +1 -1
- package/dist/runtime/polyfill/platformApi.mjs +2 -2
- package/dist/runtime/polyfill/platformApi.mjs.map +1 -1
- package/dist/runtime/polyfill/runtimeCapabilityApi.mjs +2 -2
- package/dist/runtime/polyfill/runtimeCapabilityApi.mjs.map +1 -1
- package/dist/runtime/polyfill/runtimeDataApi.d.mts +7 -7
- package/dist/runtime/polyfill/runtimeDataApi.mjs +5 -5
- package/dist/runtime/polyfill/runtimeDataApi.mjs.map +1 -1
- package/dist/runtime/polyfill/runtimeOps.mjs +10 -10
- package/dist/runtime/polyfill/runtimeOps.mjs.map +1 -1
- package/dist/runtime/polyfill/storageAsync.mjs +12 -12
- package/dist/runtime/polyfill/storageAsync.mjs.map +1 -1
- package/dist/runtime/polyfill/systemApi.mjs +3 -3
- package/dist/runtime/polyfill/systemApi.mjs.map +1 -1
- package/dist/runtime/polyfill/types/base.d.mts +5 -5
- package/dist/runtime/polyfill/types/common.d.mts +22 -22
- package/dist/runtime/polyfill/types/locationRuntime.d.mts +27 -27
- package/dist/runtime/polyfill/types/mediaAuth.d.mts +30 -30
- package/dist/runtime/polyfill/types/platformRuntime.d.mts +13 -13
- package/dist/runtime/polyfill/types/systemAuth.d.mts +11 -11
- package/dist/runtime/polyfill/uiFeedback.mjs +4 -4
- package/dist/runtime/polyfill/uiFeedback.mjs.map +1 -1
- package/dist/runtime/polyfill/uiMediaApi.d.mts +2 -2
- package/dist/runtime/polyfill/uiMediaApi.mjs.map +1 -1
- package/dist/shared/wxml.mjs +29 -10
- package/dist/shared/wxml.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { callMiniProgramAsyncFailure, callMiniProgramAsyncSuccess } from "./async.mjs";
|
|
2
2
|
import { clearStorageSyncInternal, getStorageInfoSyncInternal, getStorageSyncInternal, hasStorageKey, normalizeStorageKey, removeStorageSyncInternal, setStorageSyncInternal } from "./storage.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/runtime/polyfill/storageAsync.ts
|
|
5
5
|
function setStorageBridge(options) {
|
|
6
6
|
const key = normalizeStorageKey(options?.key);
|
|
7
7
|
if (!key) {
|
|
8
|
-
const failure =
|
|
8
|
+
const failure = callMiniProgramAsyncFailure(options, "setStorage:fail invalid key");
|
|
9
9
|
return Promise.reject(failure);
|
|
10
10
|
}
|
|
11
11
|
try {
|
|
12
12
|
setStorageSyncInternal(key, options?.data);
|
|
13
13
|
} catch (error) {
|
|
14
|
-
const failure =
|
|
14
|
+
const failure = callMiniProgramAsyncFailure(options, `setStorage:fail ${error instanceof Error ? error.message : String(error)}`);
|
|
15
15
|
return Promise.reject(failure);
|
|
16
16
|
}
|
|
17
|
-
return Promise.resolve(
|
|
17
|
+
return Promise.resolve(callMiniProgramAsyncSuccess(options, { errMsg: "setStorage:ok" }));
|
|
18
18
|
}
|
|
19
19
|
function getStorageBridge(options) {
|
|
20
20
|
const key = normalizeStorageKey(options?.key);
|
|
21
21
|
if (!key) {
|
|
22
|
-
const failure =
|
|
22
|
+
const failure = callMiniProgramAsyncFailure(options, "getStorage:fail invalid key");
|
|
23
23
|
return Promise.reject(failure);
|
|
24
24
|
}
|
|
25
25
|
if (!hasStorageKey(key)) {
|
|
26
|
-
const failure =
|
|
26
|
+
const failure = callMiniProgramAsyncFailure(options, `getStorage:fail data not found for key ${key}`);
|
|
27
27
|
return Promise.reject(failure);
|
|
28
28
|
}
|
|
29
29
|
const data = getStorageSyncInternal(key);
|
|
30
|
-
return Promise.resolve(
|
|
30
|
+
return Promise.resolve(callMiniProgramAsyncSuccess(options, {
|
|
31
31
|
errMsg: "getStorage:ok",
|
|
32
32
|
data
|
|
33
33
|
}));
|
|
@@ -35,23 +35,23 @@ function getStorageBridge(options) {
|
|
|
35
35
|
function removeStorageBridge(options) {
|
|
36
36
|
const key = normalizeStorageKey(options?.key);
|
|
37
37
|
if (!key) {
|
|
38
|
-
const failure =
|
|
38
|
+
const failure = callMiniProgramAsyncFailure(options, "removeStorage:fail invalid key");
|
|
39
39
|
return Promise.reject(failure);
|
|
40
40
|
}
|
|
41
41
|
try {
|
|
42
42
|
removeStorageSyncInternal(key);
|
|
43
43
|
} catch (error) {
|
|
44
|
-
const failure =
|
|
44
|
+
const failure = callMiniProgramAsyncFailure(options, `removeStorage:fail ${error instanceof Error ? error.message : String(error)}`);
|
|
45
45
|
return Promise.reject(failure);
|
|
46
46
|
}
|
|
47
|
-
return Promise.resolve(
|
|
47
|
+
return Promise.resolve(callMiniProgramAsyncSuccess(options, { errMsg: "removeStorage:ok" }));
|
|
48
48
|
}
|
|
49
49
|
function clearStorageBridge(options) {
|
|
50
50
|
clearStorageSyncInternal();
|
|
51
|
-
return Promise.resolve(
|
|
51
|
+
return Promise.resolve(callMiniProgramAsyncSuccess(options, { errMsg: "clearStorage:ok" }));
|
|
52
52
|
}
|
|
53
53
|
function getStorageInfoBridge(options) {
|
|
54
|
-
return Promise.resolve(
|
|
54
|
+
return Promise.resolve(callMiniProgramAsyncSuccess(options, {
|
|
55
55
|
...getStorageInfoSyncInternal(),
|
|
56
56
|
errMsg: "getStorageInfo:ok"
|
|
57
57
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storageAsync.mjs","names":[],"sources":["../../../src/runtime/polyfill/storageAsync.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"storageAsync.mjs","names":[],"sources":["../../../src/runtime/polyfill/storageAsync.ts"],"sourcesContent":["import type { MiniProgramAsyncOptions, MiniProgramBaseResult } from './types/base'\nimport type { GetStorageOptions, RemoveStorageOptions, SetStorageOptions, StorageInfoResult } from './types/common'\nimport {\n callMiniProgramAsyncFailure,\n callMiniProgramAsyncSuccess,\n} from './async'\nimport {\n clearStorageSyncInternal,\n getStorageInfoSyncInternal,\n getStorageSyncInternal,\n hasStorageKey,\n normalizeStorageKey,\n removeStorageSyncInternal,\n setStorageSyncInternal,\n} from './storage'\n\nexport function setStorageBridge(options?: SetStorageOptions) {\n const key = normalizeStorageKey(options?.key)\n if (!key) {\n const failure = callMiniProgramAsyncFailure(options, 'setStorage:fail invalid key')\n return Promise.reject(failure)\n }\n try {\n setStorageSyncInternal(key, options?.data)\n }\n catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n const failure = callMiniProgramAsyncFailure(options, `setStorage:fail ${message}`)\n return Promise.reject(failure)\n }\n return Promise.resolve(callMiniProgramAsyncSuccess(options, { errMsg: 'setStorage:ok' }))\n}\n\nexport function getStorageBridge(options?: GetStorageOptions) {\n const key = normalizeStorageKey(options?.key)\n if (!key) {\n const failure = callMiniProgramAsyncFailure(options, 'getStorage:fail invalid key')\n return Promise.reject(failure)\n }\n if (!hasStorageKey(key)) {\n const failure = callMiniProgramAsyncFailure(options, `getStorage:fail data not found for key ${key}`)\n return Promise.reject(failure)\n }\n const data = getStorageSyncInternal(key)\n return Promise.resolve(callMiniProgramAsyncSuccess(options, { errMsg: 'getStorage:ok', data }))\n}\n\nexport function removeStorageBridge(options?: RemoveStorageOptions) {\n const key = normalizeStorageKey(options?.key)\n if (!key) {\n const failure = callMiniProgramAsyncFailure(options, 'removeStorage:fail invalid key')\n return Promise.reject(failure)\n }\n try {\n removeStorageSyncInternal(key)\n }\n catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n const failure = callMiniProgramAsyncFailure(options, `removeStorage:fail ${message}`)\n return Promise.reject(failure)\n }\n return Promise.resolve(callMiniProgramAsyncSuccess(options, { errMsg: 'removeStorage:ok' }))\n}\n\nexport function clearStorageBridge(options?: MiniProgramAsyncOptions<MiniProgramBaseResult>) {\n clearStorageSyncInternal()\n return Promise.resolve(callMiniProgramAsyncSuccess(options, { errMsg: 'clearStorage:ok' }))\n}\n\nexport function getStorageInfoBridge(options?: MiniProgramAsyncOptions<StorageInfoResult>) {\n return Promise.resolve(callMiniProgramAsyncSuccess(options, {\n ...getStorageInfoSyncInternal(),\n errMsg: 'getStorageInfo:ok',\n }))\n}\n"],"mappings":";;;;AAgBA,SAAgB,iBAAiB,SAA6B;CAC5D,MAAM,MAAM,oBAAoB,SAAS,IAAI;AAC7C,KAAI,CAAC,KAAK;EACR,MAAM,UAAU,4BAA4B,SAAS,8BAA8B;AACnF,SAAO,QAAQ,OAAO,QAAQ;;AAEhC,KAAI;AACF,yBAAuB,KAAK,SAAS,KAAK;UAErC,OAAO;EAEZ,MAAM,UAAU,4BAA4B,SAAS,mBADrC,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM,GACY;AAClF,SAAO,QAAQ,OAAO,QAAQ;;AAEhC,QAAO,QAAQ,QAAQ,4BAA4B,SAAS,EAAE,QAAQ,iBAAiB,CAAC,CAAC;;AAG3F,SAAgB,iBAAiB,SAA6B;CAC5D,MAAM,MAAM,oBAAoB,SAAS,IAAI;AAC7C,KAAI,CAAC,KAAK;EACR,MAAM,UAAU,4BAA4B,SAAS,8BAA8B;AACnF,SAAO,QAAQ,OAAO,QAAQ;;AAEhC,KAAI,CAAC,cAAc,IAAI,EAAE;EACvB,MAAM,UAAU,4BAA4B,SAAS,0CAA0C,MAAM;AACrG,SAAO,QAAQ,OAAO,QAAQ;;CAEhC,MAAM,OAAO,uBAAuB,IAAI;AACxC,QAAO,QAAQ,QAAQ,4BAA4B,SAAS;EAAE,QAAQ;EAAiB;EAAM,CAAC,CAAC;;AAGjG,SAAgB,oBAAoB,SAAgC;CAClE,MAAM,MAAM,oBAAoB,SAAS,IAAI;AAC7C,KAAI,CAAC,KAAK;EACR,MAAM,UAAU,4BAA4B,SAAS,iCAAiC;AACtF,SAAO,QAAQ,OAAO,QAAQ;;AAEhC,KAAI;AACF,4BAA0B,IAAI;UAEzB,OAAO;EAEZ,MAAM,UAAU,4BAA4B,SAAS,sBADrC,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM,GACe;AACrF,SAAO,QAAQ,OAAO,QAAQ;;AAEhC,QAAO,QAAQ,QAAQ,4BAA4B,SAAS,EAAE,QAAQ,oBAAoB,CAAC,CAAC;;AAG9F,SAAgB,mBAAmB,SAA0D;AAC3F,2BAA0B;AAC1B,QAAO,QAAQ,QAAQ,4BAA4B,SAAS,EAAE,QAAQ,mBAAmB,CAAC,CAAC;;AAG7F,SAAgB,qBAAqB,SAAsD;AACzF,QAAO,QAAQ,QAAQ,4BAA4B,SAAS;EAC1D,GAAG,4BAA4B;EAC/B,QAAQ;EACT,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { callMiniProgramAsyncFailure, callMiniProgramAsyncSuccess } from "./async.mjs";
|
|
2
2
|
import { buildMenuButtonRect, buildWindowInfoSnapshot, readDeviceMemorySize, readSystemInfoSnapshot, resolveAccountAppId, resolveDeviceOrientation, resolveRuntimeTheme } from "./system.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/runtime/polyfill/systemApi.ts
|
|
@@ -8,12 +8,12 @@ function getSystemInfoSyncBridge() {
|
|
|
8
8
|
function getSystemInfoBridge(options) {
|
|
9
9
|
try {
|
|
10
10
|
const info = getSystemInfoSyncBridge();
|
|
11
|
-
return Promise.resolve(
|
|
11
|
+
return Promise.resolve(callMiniProgramAsyncSuccess(options, {
|
|
12
12
|
errMsg: "getSystemInfo:ok",
|
|
13
13
|
...info
|
|
14
14
|
}));
|
|
15
15
|
} catch (error) {
|
|
16
|
-
const failure =
|
|
16
|
+
const failure = callMiniProgramAsyncFailure(options, `getSystemInfo:fail ${error instanceof Error ? error.message : String(error)}`);
|
|
17
17
|
return Promise.reject(failure);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"systemApi.mjs","names":[],"sources":["../../../src/runtime/polyfill/systemApi.ts"],"sourcesContent":["import {\n
|
|
1
|
+
{"version":3,"file":"systemApi.mjs","names":[],"sources":["../../../src/runtime/polyfill/systemApi.ts"],"sourcesContent":["import {\n callMiniProgramAsyncFailure,\n callMiniProgramAsyncSuccess,\n} from './async'\nimport {\n buildMenuButtonRect,\n buildWindowInfoSnapshot,\n readDeviceMemorySize,\n readSystemInfoSnapshot,\n resolveAccountAppId,\n resolveDeviceOrientation,\n resolveRuntimeTheme,\n} from './system'\n\nexport function getSystemInfoSyncBridge() {\n return readSystemInfoSnapshot()\n}\n\nexport function getSystemInfoBridge(options?: any): Promise<any> {\n try {\n const info = getSystemInfoSyncBridge()\n return Promise.resolve(callMiniProgramAsyncSuccess(options, {\n errMsg: 'getSystemInfo:ok',\n ...info,\n }))\n }\n catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n const failure = callMiniProgramAsyncFailure(options, `getSystemInfo:fail ${message}`)\n return Promise.reject(failure)\n }\n}\n\nexport function getWindowInfoBridge() {\n return buildWindowInfoSnapshot(getSystemInfoSyncBridge())\n}\n\nexport function getDeviceInfoBridge() {\n const systemInfo = getSystemInfoSyncBridge()\n return {\n brand: systemInfo.brand,\n model: systemInfo.model,\n system: systemInfo.system,\n platform: systemInfo.platform,\n memorySize: readDeviceMemorySize(),\n benchmarkLevel: -1,\n abi: 'web',\n deviceOrientation: resolveDeviceOrientation(),\n }\n}\n\nexport function getAccountInfoSyncBridge() {\n const appId = resolveAccountAppId()\n return {\n miniProgram: {\n appId,\n envVersion: 'develop',\n version: '0.0.0-web',\n },\n plugin: {},\n }\n}\n\nexport function getAppBaseInfoBridge() {\n const systemInfo = getSystemInfoSyncBridge()\n const runtimeNavigator = typeof navigator !== 'undefined' ? navigator : undefined\n return {\n SDKVersion: 'web',\n language: runtimeNavigator?.language ?? 'en',\n version: runtimeNavigator?.appVersion ?? runtimeNavigator?.userAgent ?? 'web',\n platform: systemInfo.platform,\n enableDebug: false,\n theme: resolveRuntimeTheme(),\n }\n}\n\nexport function getMenuButtonBoundingClientRectBridge() {\n const { windowWidth, statusBarHeight } = getSystemInfoSyncBridge()\n return buildMenuButtonRect(windowWidth, statusBarHeight)\n}\n"],"mappings":";;;;AAcA,SAAgB,0BAA0B;AACxC,QAAO,wBAAwB;;AAGjC,SAAgB,oBAAoB,SAA6B;AAC/D,KAAI;EACF,MAAM,OAAO,yBAAyB;AACtC,SAAO,QAAQ,QAAQ,4BAA4B,SAAS;GAC1D,QAAQ;GACR,GAAG;GACJ,CAAC,CAAC;UAEE,OAAO;EAEZ,MAAM,UAAU,4BAA4B,SAAS,sBADrC,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM,GACe;AACrF,SAAO,QAAQ,OAAO,QAAQ;;;AAIlC,SAAgB,sBAAsB;AACpC,QAAO,wBAAwB,yBAAyB,CAAC;;AAG3D,SAAgB,sBAAsB;CACpC,MAAM,aAAa,yBAAyB;AAC5C,QAAO;EACL,OAAO,WAAW;EAClB,OAAO,WAAW;EAClB,QAAQ,WAAW;EACnB,UAAU,WAAW;EACrB,YAAY,sBAAsB;EAClC,gBAAgB;EAChB,KAAK;EACL,mBAAmB,0BAA0B;EAC9C;;AAGH,SAAgB,2BAA2B;AAEzC,QAAO;EACL,aAAa;GACX,OAHU,qBAAqB;GAI/B,YAAY;GACZ,SAAS;GACV;EACD,QAAQ,EAAE;EACX;;AAGH,SAAgB,uBAAuB;CACrC,MAAM,aAAa,yBAAyB;CAC5C,MAAM,mBAAmB,OAAO,cAAc,cAAc,YAAY;AACxE,QAAO;EACL,YAAY;EACZ,UAAU,kBAAkB,YAAY;EACxC,SAAS,kBAAkB,cAAc,kBAAkB,aAAa;EACxE,UAAU,WAAW;EACrB,aAAa;EACb,OAAO,qBAAqB;EAC7B;;AAGH,SAAgB,wCAAwC;CACtD,MAAM,EAAE,aAAa,oBAAoB,yBAAyB;AAClE,QAAO,oBAAoB,aAAa,gBAAgB"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
//#region src/runtime/polyfill/types/base.d.ts
|
|
2
|
-
interface
|
|
2
|
+
interface MiniProgramBaseResult {
|
|
3
3
|
errMsg: string;
|
|
4
4
|
}
|
|
5
|
-
interface
|
|
5
|
+
interface MiniProgramAsyncOptions<SuccessResult extends MiniProgramBaseResult> {
|
|
6
6
|
success?: (result: SuccessResult) => void;
|
|
7
|
-
fail?: (result:
|
|
8
|
-
complete?: (result: SuccessResult |
|
|
7
|
+
fail?: (result: MiniProgramBaseResult) => void;
|
|
8
|
+
complete?: (result: SuccessResult | MiniProgramBaseResult) => void;
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
11
|
-
export {
|
|
11
|
+
export { MiniProgramAsyncOptions, MiniProgramBaseResult };
|
|
12
12
|
//# sourceMappingURL=base.d.mts.map
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MiniProgramAsyncOptions, MiniProgramBaseResult } from "./base.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/runtime/polyfill/types/common.d.ts
|
|
4
|
-
interface ShowToastOptions extends
|
|
4
|
+
interface ShowToastOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
5
5
|
title?: string;
|
|
6
6
|
icon?: 'success' | 'error' | 'none';
|
|
7
7
|
duration?: number;
|
|
8
8
|
}
|
|
9
|
-
interface SetClipboardDataOptions extends
|
|
9
|
+
interface SetClipboardDataOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
10
10
|
data?: string;
|
|
11
11
|
}
|
|
12
|
-
interface GetClipboardDataSuccessResult extends
|
|
12
|
+
interface GetClipboardDataSuccessResult extends MiniProgramBaseResult {
|
|
13
13
|
data: string;
|
|
14
14
|
}
|
|
15
|
-
interface GetClipboardDataOptions extends
|
|
16
|
-
interface SetStorageOptions extends
|
|
15
|
+
interface GetClipboardDataOptions extends MiniProgramAsyncOptions<GetClipboardDataSuccessResult> {}
|
|
16
|
+
interface SetStorageOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
17
17
|
key?: string;
|
|
18
18
|
data?: any;
|
|
19
19
|
}
|
|
20
|
-
interface GetStorageSuccessResult extends
|
|
20
|
+
interface GetStorageSuccessResult extends MiniProgramBaseResult {
|
|
21
21
|
data: any;
|
|
22
22
|
}
|
|
23
|
-
interface GetStorageOptions extends
|
|
23
|
+
interface GetStorageOptions extends MiniProgramAsyncOptions<GetStorageSuccessResult> {
|
|
24
24
|
key?: string;
|
|
25
25
|
}
|
|
26
|
-
interface RemoveStorageOptions extends
|
|
26
|
+
interface RemoveStorageOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
27
27
|
key?: string;
|
|
28
28
|
}
|
|
29
|
-
interface StorageInfoResult extends
|
|
29
|
+
interface StorageInfoResult extends MiniProgramBaseResult {
|
|
30
30
|
keys: string[];
|
|
31
31
|
currentSize: number;
|
|
32
32
|
limitSize: number;
|
|
33
33
|
}
|
|
34
|
-
interface FileReadResult extends
|
|
34
|
+
interface FileReadResult extends MiniProgramBaseResult {
|
|
35
35
|
data: string | ArrayBuffer;
|
|
36
36
|
}
|
|
37
|
-
interface FileWriteOptions extends
|
|
37
|
+
interface FileWriteOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
38
38
|
filePath?: string;
|
|
39
39
|
data?: string | ArrayBuffer | ArrayBufferView;
|
|
40
40
|
encoding?: string;
|
|
41
41
|
}
|
|
42
|
-
interface FileReadOptions extends
|
|
42
|
+
interface FileReadOptions extends MiniProgramAsyncOptions<FileReadResult> {
|
|
43
43
|
filePath?: string;
|
|
44
44
|
encoding?: string;
|
|
45
45
|
}
|
|
@@ -66,12 +66,12 @@ interface WorkerBridge {
|
|
|
66
66
|
onError: (callback: WorkerErrorCallback) => void;
|
|
67
67
|
offError: (callback?: WorkerErrorCallback) => void;
|
|
68
68
|
}
|
|
69
|
-
interface RequestSuccessResult extends
|
|
69
|
+
interface RequestSuccessResult extends MiniProgramBaseResult {
|
|
70
70
|
data: any;
|
|
71
71
|
statusCode: number;
|
|
72
72
|
header: Record<string, string>;
|
|
73
73
|
}
|
|
74
|
-
interface RequestOptions extends
|
|
74
|
+
interface RequestOptions extends MiniProgramAsyncOptions<RequestSuccessResult> {
|
|
75
75
|
url?: string;
|
|
76
76
|
method?: string;
|
|
77
77
|
data?: any;
|
|
@@ -80,21 +80,21 @@ interface RequestOptions extends WxAsyncOptions<RequestSuccessResult> {
|
|
|
80
80
|
dataType?: 'json' | 'text';
|
|
81
81
|
responseType?: 'text' | 'arraybuffer';
|
|
82
82
|
}
|
|
83
|
-
interface DownloadFileSuccessResult extends
|
|
83
|
+
interface DownloadFileSuccessResult extends MiniProgramBaseResult {
|
|
84
84
|
tempFilePath: string;
|
|
85
85
|
statusCode: number;
|
|
86
86
|
}
|
|
87
|
-
interface DownloadFileOptions extends
|
|
87
|
+
interface DownloadFileOptions extends MiniProgramAsyncOptions<DownloadFileSuccessResult> {
|
|
88
88
|
url?: string;
|
|
89
89
|
header?: Record<string, string>;
|
|
90
90
|
timeout?: number;
|
|
91
91
|
}
|
|
92
|
-
interface UploadFileSuccessResult extends
|
|
92
|
+
interface UploadFileSuccessResult extends MiniProgramBaseResult {
|
|
93
93
|
data: string;
|
|
94
94
|
statusCode: number;
|
|
95
95
|
header: Record<string, string>;
|
|
96
96
|
}
|
|
97
|
-
interface UploadFileOptions extends
|
|
97
|
+
interface UploadFileOptions extends MiniProgramAsyncOptions<UploadFileSuccessResult> {
|
|
98
98
|
url?: string;
|
|
99
99
|
filePath?: string;
|
|
100
100
|
name?: string;
|
|
@@ -102,7 +102,7 @@ interface UploadFileOptions extends WxAsyncOptions<UploadFileSuccessResult> {
|
|
|
102
102
|
formData?: Record<string, unknown>;
|
|
103
103
|
timeout?: number;
|
|
104
104
|
}
|
|
105
|
-
interface PreviewImageOptions extends
|
|
105
|
+
interface PreviewImageOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
106
106
|
current?: string;
|
|
107
107
|
urls?: string[];
|
|
108
108
|
}
|
|
@@ -112,11 +112,11 @@ interface ChooseImageTempFile {
|
|
|
112
112
|
type: string;
|
|
113
113
|
name: string;
|
|
114
114
|
}
|
|
115
|
-
interface ChooseImageSuccessResult extends
|
|
115
|
+
interface ChooseImageSuccessResult extends MiniProgramBaseResult {
|
|
116
116
|
tempFilePaths: string[];
|
|
117
117
|
tempFiles: ChooseImageTempFile[];
|
|
118
118
|
}
|
|
119
|
-
interface ChooseImageOptions extends
|
|
119
|
+
interface ChooseImageOptions extends MiniProgramAsyncOptions<ChooseImageSuccessResult> {
|
|
120
120
|
count?: number;
|
|
121
121
|
sizeType?: Array<'original' | 'compressed'>;
|
|
122
122
|
sourceType?: Array<'album' | 'camera'>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MiniProgramAsyncOptions, MiniProgramBaseResult } from "./base.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/runtime/polyfill/types/locationRuntime.d.ts
|
|
4
|
-
interface GetLocationSuccessResult extends
|
|
4
|
+
interface GetLocationSuccessResult extends MiniProgramBaseResult {
|
|
5
5
|
latitude: number;
|
|
6
6
|
longitude: number;
|
|
7
7
|
speed: number;
|
|
@@ -10,25 +10,25 @@ interface GetLocationSuccessResult extends WxBaseResult {
|
|
|
10
10
|
verticalAccuracy: number;
|
|
11
11
|
horizontalAccuracy: number;
|
|
12
12
|
}
|
|
13
|
-
interface GetLocationOptions extends
|
|
13
|
+
interface GetLocationOptions extends MiniProgramAsyncOptions<GetLocationSuccessResult> {
|
|
14
14
|
type?: 'wgs84' | 'gcj02';
|
|
15
15
|
altitude?: boolean;
|
|
16
16
|
isHighAccuracy?: boolean;
|
|
17
17
|
highAccuracyExpireTime?: number;
|
|
18
18
|
}
|
|
19
|
-
interface GetFuzzyLocationSuccessResult extends
|
|
19
|
+
interface GetFuzzyLocationSuccessResult extends MiniProgramBaseResult {
|
|
20
20
|
latitude: number;
|
|
21
21
|
longitude: number;
|
|
22
22
|
accuracy: number;
|
|
23
23
|
}
|
|
24
|
-
interface GetFuzzyLocationOptions extends
|
|
24
|
+
interface GetFuzzyLocationOptions extends MiniProgramAsyncOptions<GetFuzzyLocationSuccessResult> {}
|
|
25
25
|
type NetworkType = 'wifi' | '2g' | '3g' | '4g' | '5g' | 'unknown' | 'none';
|
|
26
26
|
interface NetworkStatusResult {
|
|
27
27
|
isConnected: boolean;
|
|
28
28
|
networkType: NetworkType;
|
|
29
29
|
}
|
|
30
|
-
interface GetNetworkTypeSuccessResult extends
|
|
31
|
-
interface GetNetworkTypeOptions extends
|
|
30
|
+
interface GetNetworkTypeSuccessResult extends MiniProgramBaseResult, NetworkStatusResult {}
|
|
31
|
+
interface GetNetworkTypeOptions extends MiniProgramAsyncOptions<GetNetworkTypeSuccessResult> {}
|
|
32
32
|
type NetworkStatusChangeCallback = (result: NetworkStatusResult) => void;
|
|
33
33
|
interface WindowResizeResult {
|
|
34
34
|
size: {
|
|
@@ -39,33 +39,33 @@ interface WindowResizeResult {
|
|
|
39
39
|
windowHeight: number;
|
|
40
40
|
}
|
|
41
41
|
type WindowResizeCallback = (result: WindowResizeResult) => void;
|
|
42
|
-
interface ShowLoadingOptions extends
|
|
42
|
+
interface ShowLoadingOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
43
43
|
title?: string;
|
|
44
44
|
mask?: boolean;
|
|
45
45
|
}
|
|
46
|
-
interface SetBackgroundColorOptions extends
|
|
46
|
+
interface SetBackgroundColorOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
47
47
|
backgroundColor?: string;
|
|
48
48
|
backgroundColorTop?: string;
|
|
49
49
|
backgroundColorBottom?: string;
|
|
50
50
|
}
|
|
51
|
-
interface SetBackgroundTextStyleOptions extends
|
|
51
|
+
interface SetBackgroundTextStyleOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
52
52
|
textStyle?: 'dark' | 'light';
|
|
53
53
|
}
|
|
54
|
-
interface ShareMenuOptions extends
|
|
54
|
+
interface ShareMenuOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
55
55
|
withShareTicket?: boolean;
|
|
56
56
|
menus?: string[];
|
|
57
57
|
}
|
|
58
|
-
interface NavigateToMiniProgramOptions extends
|
|
58
|
+
interface NavigateToMiniProgramOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
59
59
|
appId?: string;
|
|
60
60
|
path?: string;
|
|
61
61
|
extraData?: Record<string, any>;
|
|
62
62
|
envVersion?: 'develop' | 'trial' | 'release';
|
|
63
63
|
}
|
|
64
|
-
interface LoadSubPackageOptions extends
|
|
64
|
+
interface LoadSubPackageOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
65
65
|
name?: string;
|
|
66
66
|
root?: string;
|
|
67
67
|
}
|
|
68
|
-
interface PreloadSubpackageOptions extends
|
|
68
|
+
interface PreloadSubpackageOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
69
69
|
name?: string;
|
|
70
70
|
root?: string;
|
|
71
71
|
}
|
|
@@ -87,14 +87,14 @@ interface LogManager {
|
|
|
87
87
|
log: (...args: unknown[]) => void;
|
|
88
88
|
warn: (...args: unknown[]) => void;
|
|
89
89
|
}
|
|
90
|
-
interface ChooseLocationSuccessResult extends
|
|
90
|
+
interface ChooseLocationSuccessResult extends MiniProgramBaseResult {
|
|
91
91
|
name: string;
|
|
92
92
|
address: string;
|
|
93
93
|
latitude: number;
|
|
94
94
|
longitude: number;
|
|
95
95
|
}
|
|
96
|
-
interface ChooseLocationOptions extends
|
|
97
|
-
interface ChooseAddressSuccessResult extends
|
|
96
|
+
interface ChooseLocationOptions extends MiniProgramAsyncOptions<ChooseLocationSuccessResult> {}
|
|
97
|
+
interface ChooseAddressSuccessResult extends MiniProgramBaseResult {
|
|
98
98
|
userName: string;
|
|
99
99
|
postalCode: string;
|
|
100
100
|
provinceName: string;
|
|
@@ -104,46 +104,46 @@ interface ChooseAddressSuccessResult extends WxBaseResult {
|
|
|
104
104
|
nationalCode: string;
|
|
105
105
|
telNumber: string;
|
|
106
106
|
}
|
|
107
|
-
interface ChooseAddressOptions extends
|
|
108
|
-
interface GetImageInfoSuccessResult extends
|
|
107
|
+
interface ChooseAddressOptions extends MiniProgramAsyncOptions<ChooseAddressSuccessResult> {}
|
|
108
|
+
interface GetImageInfoSuccessResult extends MiniProgramBaseResult {
|
|
109
109
|
width: number;
|
|
110
110
|
height: number;
|
|
111
111
|
path: string;
|
|
112
112
|
type: string;
|
|
113
113
|
orientation: 'up';
|
|
114
114
|
}
|
|
115
|
-
interface GetImageInfoOptions extends
|
|
115
|
+
interface GetImageInfoOptions extends MiniProgramAsyncOptions<GetImageInfoSuccessResult> {
|
|
116
116
|
src?: string;
|
|
117
117
|
}
|
|
118
|
-
interface MakePhoneCallOptions extends
|
|
118
|
+
interface MakePhoneCallOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
119
119
|
phoneNumber?: string;
|
|
120
120
|
}
|
|
121
|
-
interface OpenLocationOptions extends
|
|
121
|
+
interface OpenLocationOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
122
122
|
latitude?: number;
|
|
123
123
|
longitude?: number;
|
|
124
124
|
scale?: number;
|
|
125
125
|
name?: string;
|
|
126
126
|
address?: string;
|
|
127
127
|
}
|
|
128
|
-
interface TabBarOptions extends
|
|
128
|
+
interface TabBarOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
129
129
|
animation?: boolean;
|
|
130
130
|
}
|
|
131
|
-
interface OpenCustomerServiceChatOptions extends
|
|
131
|
+
interface OpenCustomerServiceChatOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
132
132
|
corpId?: string;
|
|
133
133
|
extInfo?: Record<string, any>;
|
|
134
134
|
url?: string;
|
|
135
135
|
}
|
|
136
|
-
interface RequestPaymentOptions extends
|
|
136
|
+
interface RequestPaymentOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
137
137
|
timeStamp?: string;
|
|
138
138
|
nonceStr?: string;
|
|
139
139
|
package?: string;
|
|
140
140
|
signType?: string;
|
|
141
141
|
paySign?: string;
|
|
142
142
|
}
|
|
143
|
-
interface RequestSubscribeMessageSuccessResult extends
|
|
143
|
+
interface RequestSubscribeMessageSuccessResult extends MiniProgramBaseResult {
|
|
144
144
|
[tmplId: string]: string;
|
|
145
145
|
}
|
|
146
|
-
interface RequestSubscribeMessageOptions extends
|
|
146
|
+
interface RequestSubscribeMessageOptions extends MiniProgramAsyncOptions<RequestSubscribeMessageSuccessResult> {
|
|
147
147
|
tmplIds?: string[];
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MiniProgramAsyncOptions, MiniProgramBaseResult } from "./base.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/runtime/polyfill/types/mediaAuth.d.ts
|
|
4
4
|
interface AuthSettingResult {
|
|
5
5
|
authSetting: Record<string, boolean>;
|
|
6
6
|
}
|
|
7
|
-
interface GetSettingSuccessResult extends
|
|
8
|
-
interface GetSettingOptions extends
|
|
9
|
-
interface AuthorizeOptions extends
|
|
7
|
+
interface GetSettingSuccessResult extends MiniProgramBaseResult, AuthSettingResult {}
|
|
8
|
+
interface GetSettingOptions extends MiniProgramAsyncOptions<GetSettingSuccessResult> {}
|
|
9
|
+
interface AuthorizeOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
10
10
|
scope?: string;
|
|
11
11
|
}
|
|
12
|
-
interface OpenSettingSuccessResult extends
|
|
13
|
-
interface OpenSettingOptions extends
|
|
12
|
+
interface OpenSettingSuccessResult extends MiniProgramBaseResult, AuthSettingResult {}
|
|
13
|
+
interface OpenSettingOptions extends MiniProgramAsyncOptions<OpenSettingSuccessResult> {}
|
|
14
14
|
type ChooseMediaType = 'image' | 'video';
|
|
15
15
|
interface ChooseMediaTempFile {
|
|
16
16
|
tempFilePath: string;
|
|
@@ -21,11 +21,11 @@ interface ChooseMediaTempFile {
|
|
|
21
21
|
height: number;
|
|
22
22
|
duration: number;
|
|
23
23
|
}
|
|
24
|
-
interface ChooseMediaSuccessResult extends
|
|
24
|
+
interface ChooseMediaSuccessResult extends MiniProgramBaseResult {
|
|
25
25
|
type: ChooseMediaType;
|
|
26
26
|
tempFiles: ChooseMediaTempFile[];
|
|
27
27
|
}
|
|
28
|
-
interface ChooseMediaOptions extends
|
|
28
|
+
interface ChooseMediaOptions extends MiniProgramAsyncOptions<ChooseMediaSuccessResult> {
|
|
29
29
|
count?: number;
|
|
30
30
|
mediaType?: Array<'image' | 'video' | 'mix'>;
|
|
31
31
|
sourceType?: Array<'album' | 'camera'>;
|
|
@@ -33,29 +33,29 @@ interface ChooseMediaOptions extends WxAsyncOptions<ChooseMediaSuccessResult> {
|
|
|
33
33
|
sizeType?: Array<'original' | 'compressed'>;
|
|
34
34
|
camera?: 'back' | 'front';
|
|
35
35
|
}
|
|
36
|
-
interface CompressImageSuccessResult extends
|
|
36
|
+
interface CompressImageSuccessResult extends MiniProgramBaseResult {
|
|
37
37
|
tempFilePath: string;
|
|
38
38
|
}
|
|
39
|
-
interface CompressImageOptions extends
|
|
39
|
+
interface CompressImageOptions extends MiniProgramAsyncOptions<CompressImageSuccessResult> {
|
|
40
40
|
src?: string;
|
|
41
41
|
quality?: number;
|
|
42
42
|
compressedWidth?: number;
|
|
43
43
|
compressedHeight?: number;
|
|
44
44
|
}
|
|
45
|
-
interface ChooseVideoSuccessResult extends
|
|
45
|
+
interface ChooseVideoSuccessResult extends MiniProgramBaseResult {
|
|
46
46
|
tempFilePath: string;
|
|
47
47
|
duration: number;
|
|
48
48
|
size: number;
|
|
49
49
|
height: number;
|
|
50
50
|
width: number;
|
|
51
51
|
}
|
|
52
|
-
interface ChooseVideoOptions extends
|
|
52
|
+
interface ChooseVideoOptions extends MiniProgramAsyncOptions<ChooseVideoSuccessResult> {
|
|
53
53
|
sourceType?: Array<'album' | 'camera'>;
|
|
54
54
|
compressed?: boolean;
|
|
55
55
|
maxDuration?: number;
|
|
56
56
|
camera?: 'back' | 'front';
|
|
57
57
|
}
|
|
58
|
-
interface GetVideoInfoSuccessResult extends
|
|
58
|
+
interface GetVideoInfoSuccessResult extends MiniProgramBaseResult {
|
|
59
59
|
size: number;
|
|
60
60
|
duration: number;
|
|
61
61
|
width: number;
|
|
@@ -65,10 +65,10 @@ interface GetVideoInfoSuccessResult extends WxBaseResult {
|
|
|
65
65
|
type: string;
|
|
66
66
|
orientation: 'up';
|
|
67
67
|
}
|
|
68
|
-
interface GetVideoInfoOptions extends
|
|
68
|
+
interface GetVideoInfoOptions extends MiniProgramAsyncOptions<GetVideoInfoSuccessResult> {
|
|
69
69
|
src?: string;
|
|
70
70
|
}
|
|
71
|
-
interface CompressVideoSuccessResult extends
|
|
71
|
+
interface CompressVideoSuccessResult extends MiniProgramBaseResult {
|
|
72
72
|
tempFilePath: string;
|
|
73
73
|
size: number;
|
|
74
74
|
duration: number;
|
|
@@ -77,7 +77,7 @@ interface CompressVideoSuccessResult extends WxBaseResult {
|
|
|
77
77
|
bitrate: number;
|
|
78
78
|
fps: number;
|
|
79
79
|
}
|
|
80
|
-
interface CompressVideoOptions extends
|
|
80
|
+
interface CompressVideoOptions extends MiniProgramAsyncOptions<CompressVideoSuccessResult> {
|
|
81
81
|
src?: string;
|
|
82
82
|
quality?: 'low' | 'medium' | 'high';
|
|
83
83
|
bitrate?: number;
|
|
@@ -87,35 +87,35 @@ interface MediaPreviewSource {
|
|
|
87
87
|
type?: 'image' | 'video';
|
|
88
88
|
poster?: string;
|
|
89
89
|
}
|
|
90
|
-
interface PreviewMediaOptions extends
|
|
90
|
+
interface PreviewMediaOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
91
91
|
sources?: MediaPreviewSource[];
|
|
92
92
|
current?: number;
|
|
93
93
|
}
|
|
94
|
-
interface SaveVideoToPhotosAlbumOptions extends
|
|
94
|
+
interface SaveVideoToPhotosAlbumOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
95
95
|
filePath?: string;
|
|
96
96
|
}
|
|
97
|
-
interface ChooseFileSuccessResult extends
|
|
97
|
+
interface ChooseFileSuccessResult extends MiniProgramBaseResult {
|
|
98
98
|
tempFiles: ChooseMessageFileTempFile[];
|
|
99
99
|
}
|
|
100
|
-
interface ChooseFileOptions extends
|
|
100
|
+
interface ChooseFileOptions extends MiniProgramAsyncOptions<ChooseFileSuccessResult> {
|
|
101
101
|
count?: number;
|
|
102
102
|
type?: 'all' | 'video' | 'image' | 'file';
|
|
103
103
|
extension?: string[];
|
|
104
104
|
}
|
|
105
|
-
interface OpenVideoEditorSuccessResult extends
|
|
105
|
+
interface OpenVideoEditorSuccessResult extends MiniProgramBaseResult {
|
|
106
106
|
tempFilePath: string;
|
|
107
107
|
}
|
|
108
|
-
interface OpenVideoEditorOptions extends
|
|
108
|
+
interface OpenVideoEditorOptions extends MiniProgramAsyncOptions<OpenVideoEditorSuccessResult> {
|
|
109
109
|
src?: string;
|
|
110
110
|
}
|
|
111
|
-
interface SaveFileSuccessResult extends
|
|
111
|
+
interface SaveFileSuccessResult extends MiniProgramBaseResult {
|
|
112
112
|
savedFilePath: string;
|
|
113
113
|
}
|
|
114
|
-
interface SaveFileOptions extends
|
|
114
|
+
interface SaveFileOptions extends MiniProgramAsyncOptions<SaveFileSuccessResult> {
|
|
115
115
|
tempFilePath?: string;
|
|
116
116
|
filePath?: string;
|
|
117
117
|
}
|
|
118
|
-
interface SaveFileToDiskOptions extends
|
|
118
|
+
interface SaveFileToDiskOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
119
119
|
filePath?: string;
|
|
120
120
|
fileName?: string;
|
|
121
121
|
}
|
|
@@ -126,24 +126,24 @@ interface ChooseMessageFileTempFile {
|
|
|
126
126
|
name: string;
|
|
127
127
|
time: number;
|
|
128
128
|
}
|
|
129
|
-
interface ChooseMessageFileSuccessResult extends
|
|
129
|
+
interface ChooseMessageFileSuccessResult extends MiniProgramBaseResult {
|
|
130
130
|
tempFiles: ChooseMessageFileTempFile[];
|
|
131
131
|
}
|
|
132
|
-
interface ChooseMessageFileOptions extends
|
|
132
|
+
interface ChooseMessageFileOptions extends MiniProgramAsyncOptions<ChooseMessageFileSuccessResult> {
|
|
133
133
|
count?: number;
|
|
134
134
|
type?: 'all' | 'video' | 'image' | 'file';
|
|
135
135
|
}
|
|
136
|
-
interface SaveImageToPhotosAlbumOptions extends
|
|
136
|
+
interface SaveImageToPhotosAlbumOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
|
|
137
137
|
filePath?: string;
|
|
138
138
|
}
|
|
139
|
-
interface ScanCodeSuccessResult extends
|
|
139
|
+
interface ScanCodeSuccessResult extends MiniProgramBaseResult {
|
|
140
140
|
result: string;
|
|
141
141
|
scanType: string;
|
|
142
142
|
charSet: string;
|
|
143
143
|
path: string;
|
|
144
144
|
rawData: string;
|
|
145
145
|
}
|
|
146
|
-
interface ScanCodeOptions extends
|
|
146
|
+
interface ScanCodeOptions extends MiniProgramAsyncOptions<ScanCodeSuccessResult> {
|
|
147
147
|
onlyFromCamera?: boolean;
|
|
148
148
|
scanType?: string[];
|
|
149
149
|
}
|