zhangbo1_wd

toast居中。

@@ -5,7 +5,7 @@ export class ToastUtils { @@ -5,7 +5,7 @@ export class ToastUtils {
5 private static shortToastTime: number = 1000 5 private static shortToastTime: number = 1000
6 6
7 static showToast(message: ResourceStr, duration: number) { 7 static showToast(message: ResourceStr, duration: number) {
8 - prompt.showToast({ message: message, duration: duration }) 8 + prompt.showToast({ message: message, duration: duration, alignment: Alignment.Center })
9 } 9 }
10 10
11 static shortToast(message: ResourceStr) { 11 static shortToast(message: ResourceStr) {