HMDemo/common_ui/src/main/ets/utils/Toast.ets
2024-06-03 11:57:34 +08:00

12 lines
299 B
Plaintext

import promptAction from '@ohos.promptAction';
export class Toast {
static showToast(message: ResourceStr, topmost: boolean = false) {
promptAction.showToast({
message: message,
duration: 2000,
bottom: "50%",
showMode: promptAction.ToastShowMode.TOP_MOST
});
}
}