代码调整
This commit is contained in:
@@ -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'
|
||||
|
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