@doubao-dev/taro-runtime 0.0.42 → 0.1.0
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/api/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { exitMiniProgram, navigateBack, navigateTo, getCurrentPages, reLaunch, r
|
|
|
8
8
|
export { setStorage, setStorageSync, getStorage, getStorageSync, removeStorage, removeStorageSync, clearStorage, clearStorageSync, getStorageInfo, getStorageInfoSync } from './storage/index.js';
|
|
9
9
|
export * from './system/index.js';
|
|
10
10
|
export * from './location/index.js';
|
|
11
|
-
export { hideLoading, hideToast, showActionSheet, showLoading, showModal } from './interaction/index.js';
|
|
11
|
+
export { disableAlertBeforeUnload, enableAlertBeforeUnload, hideLoading, hideToast, showActionSheet, showLoading, showModal } from './interaction/index.js';
|
|
12
12
|
export { showToast } from './show-toast/index.js';
|
|
13
13
|
export { createMapContext } from './map/index.js';
|
|
14
14
|
export { createSelectorQuery } from './create-selector-query/index.js';
|
package/dist/api/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export { exitMiniProgram, navigateBack, navigateTo, getCurrentPages, reLaunch, r
|
|
|
8
8
|
export { setStorage, setStorageSync, getStorage, getStorageSync, removeStorage, removeStorageSync, clearStorage, clearStorageSync, getStorageInfo, getStorageInfoSync } from './storage/index.js';
|
|
9
9
|
export * from './system/index.js';
|
|
10
10
|
export * from './location/index.js';
|
|
11
|
-
export { hideLoading, hideToast, showActionSheet, showLoading, showModal } from './interaction/index.js';
|
|
11
|
+
export { disableAlertBeforeUnload, enableAlertBeforeUnload, hideLoading, hideToast, showActionSheet, showLoading, showModal } from './interaction/index.js';
|
|
12
12
|
export { showToast } from './show-toast/index.js';
|
|
13
13
|
export { createMapContext } from './map/index.js';
|
|
14
14
|
export { createSelectorQuery } from './create-selector-query/index.js';
|
|
@@ -9,10 +9,16 @@ type TaroHideLoadingOption = Parameters<typeof Taro.hideLoading>[0];
|
|
|
9
9
|
type TaroHideLoadingResult = ReturnType<typeof Taro.hideLoading>;
|
|
10
10
|
type TaroShowActionSheetOption = Parameters<typeof Taro.showActionSheet>[0];
|
|
11
11
|
type TaroShowActionSheetResult = Awaited<ReturnType<typeof Taro.showActionSheet>>;
|
|
12
|
+
type TaroEnableAlertBeforeUnloadOption = Parameters<typeof Taro.enableAlertBeforeUnload>[0];
|
|
13
|
+
type TaroEnableAlertBeforeUnloadResult = ReturnType<typeof Taro.enableAlertBeforeUnload>;
|
|
14
|
+
type TaroDisableAlertBeforeUnloadOption = Parameters<typeof Taro.disableAlertBeforeUnload>[0];
|
|
15
|
+
type TaroDisableAlertBeforeUnloadResult = ReturnType<typeof Taro.disableAlertBeforeUnload>;
|
|
12
16
|
export declare function showModal(option?: TaroShowModalOption): Promise<TaroShowModalResult>;
|
|
13
17
|
export declare function showLoading(option?: TaroShowLoadingOption): Promise<TaroShowLoadingResult>;
|
|
14
18
|
export declare function hideToast(option?: TaroHideToastOption): TaroHideToastResult;
|
|
15
19
|
export declare function hideLoading(option?: TaroHideLoadingOption): TaroHideLoadingResult;
|
|
16
20
|
export declare function showActionSheet(option: TaroShowActionSheetOption): Promise<TaroShowActionSheetResult>;
|
|
21
|
+
export declare function enableAlertBeforeUnload(option: TaroEnableAlertBeforeUnloadOption): TaroEnableAlertBeforeUnloadResult;
|
|
22
|
+
export declare function disableAlertBeforeUnload(option?: TaroDisableAlertBeforeUnloadOption): TaroDisableAlertBeforeUnloadResult;
|
|
17
23
|
export {};
|
|
18
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { hideLoading as appHideLoading, hideToast as appHideToast, showActionSheet as appShowActionSheet, showLoading as appShowLoading, showModal as appShowModal } from '@byted-doubao-apps/framework/api';
|
|
1
|
+
import { disableAlertBeforeUnload as appDisableAlertBeforeUnload, enableAlertBeforeUnload as appEnableAlertBeforeUnload, hideLoading as appHideLoading, hideToast as appHideToast, showActionSheet as appShowActionSheet, showLoading as appShowLoading, showModal as appShowModal } from '@byted-doubao-apps/framework/api';
|
|
2
2
|
import { buildOkCallbackResult, runCallbackApi, runTaroApi } from '../utils.js';
|
|
3
3
|
function runVoidCallbackApi(apiName, callbacks, run) {
|
|
4
4
|
const task = runCallbackApi(apiName, callbacks, run);
|
|
@@ -60,4 +60,10 @@ export function hideLoading(option) {
|
|
|
60
60
|
export async function showActionSheet(option) {
|
|
61
61
|
return runTaroApi('showActionSheet', option, async () => buildShowActionSheetResult(await appShowActionSheet(buildShowActionSheetParams(option))));
|
|
62
62
|
}
|
|
63
|
+
export function enableAlertBeforeUnload(option) {
|
|
64
|
+
return runVoidCallbackApi('enableAlertBeforeUnload', option, () => appEnableAlertBeforeUnload({ message: option.message }));
|
|
65
|
+
}
|
|
66
|
+
export function disableAlertBeforeUnload(option) {
|
|
67
|
+
return runVoidCallbackApi('disableAlertBeforeUnload', option, () => appDisableAlertBeforeUnload());
|
|
68
|
+
}
|
|
63
69
|
//# sourceMappingURL=index.js.map
|
|
@@ -190,9 +190,7 @@ function DoubaoAppsMap(props) {
|
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
};
|
|
193
|
-
return
|
|
194
|
-
// biome-ignore lint: key is not sure
|
|
195
|
-
<map-marker {...markerElementPropsWithRef}>{markerContent}</map-marker>);
|
|
193
|
+
return <map-marker {...markerElementPropsWithRef}>{markerContent}</map-marker>;
|
|
196
194
|
})}
|
|
197
195
|
{children}
|
|
198
196
|
</map>);
|
package/package.json
CHANGED