代码调整

This commit is contained in:
2024-06-03 11:57:34 +08:00
parent 172581dff7
commit 94812592c2
5 changed files with 12 additions and 6 deletions

View File

@@ -4,3 +4,4 @@ export { WebView, WebViewController, WebViewParam } from './src/main/ets/compone
export { CommonRes, CommonMediaName } from './src/main/ets/utils/CommonRes'
export { PhoneInput } from './src/main/ets/component/InputComponent'
export { Toast } from './src/main/ets/utils/Toast'

View 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
});
}
}