mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-11-23 15:20:17 +00:00
promptAction,UIcontext 添加 openToast,closeToast接口
Signed-off-by: yangziyong <nsyangziyong@huawei.com>
This commit is contained in:
parent
40ac165759
commit
31f3c1186c
33
api/@ohos.arkui.UIContext.d.ts
vendored
33
api/@ohos.arkui.UIContext.d.ts
vendored
@ -965,6 +965,39 @@ export class PromptAction {
|
||||
*/
|
||||
showToast(options: promptAction.ShowToastOptions): void;
|
||||
|
||||
/**
|
||||
* Displays the notification text.
|
||||
*
|
||||
* @param { promptAction.ShowToastOptions } options - Options.
|
||||
* @returns { Promise<number> } return the toast id that will be used by closeToast.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes:
|
||||
* <br> 1. Mandatory parameters are left unspecified.
|
||||
* <br> 2. Incorrect parameters types.
|
||||
* <br> 3. Parameter verification failed.
|
||||
* @throws { BusinessError } 100001 - Internal error.
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @crossplatform
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
openToast(options: promptAction.ShowToastOptions): Promise<number>;
|
||||
|
||||
/**
|
||||
* Close the notification text.
|
||||
*
|
||||
* @param { number } toastId - the toast id that returned by openToast.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes:
|
||||
* <br> 1. Mandatory parameters are left unspecified.
|
||||
* <br> 2. Incorrect parameters types.
|
||||
* <br> 3. Parameter verification failed.
|
||||
* @throws { BusinessError } 100001 - Internal error.
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @crossplatform
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
closeToast(toastId: number): void;
|
||||
|
||||
/**
|
||||
* Displays the dialog box.
|
||||
*
|
||||
|
33
api/@ohos.promptAction.d.ts
vendored
33
api/@ohos.promptAction.d.ts
vendored
@ -1115,6 +1115,39 @@ declare namespace promptAction {
|
||||
*/
|
||||
function showToast(options: ShowToastOptions): void;
|
||||
|
||||
/**
|
||||
* Displays the notification text.
|
||||
*
|
||||
* @param { ShowToastOptions } options - Options.
|
||||
* @returns { Promise<number> } return the toast id that will be used by closeToast.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes:
|
||||
* <br> 1. Mandatory parameters are left unspecified.
|
||||
* <br> 2. Incorrect parameters types.
|
||||
* <br> 3. Parameter verification failed.
|
||||
* @throws { BusinessError } 100001 - Internal error.
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @crossplatform
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
function openToast(options: ShowToastOptions): Promise<number>;
|
||||
|
||||
/**
|
||||
* Close the notification text.
|
||||
*
|
||||
* @param { number } toastId - the toast id that returned by openToast.
|
||||
* @throws { BusinessError } 401 - Parameter error. Possible causes:
|
||||
* <br> 1. Mandatory parameters are left unspecified.
|
||||
* <br> 2. Incorrect parameters types.
|
||||
* <br> 3. Parameter verification failed.
|
||||
* @throws { BusinessError } 100001 - Internal error.
|
||||
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
||||
* @crossplatform
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
function closeToast(toastId: number): void;
|
||||
|
||||
/**
|
||||
* Displays the dialog box.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user