代码调整
This commit is contained in:
12
common_ui/src/main/ets/utils/Toast.ets
Normal file
12
common_ui/src/main/ets/utils/Toast.ets
Normal file
@@ -0,0 +1,12 @@
|
||||
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
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user