diff --git a/src/main/ets/utils/ToolsHelper.ets b/src/main/ets/utils/ToolsHelper.ets index 35a6667..4e0e713 100644 --- a/src/main/ets/utils/ToolsHelper.ets +++ b/src/main/ets/utils/ToolsHelper.ets @@ -28,6 +28,7 @@ export interface ConfirmOptions { export interface ListOptions { title?: string cancel?: Btn + alignment?: DialogAlignment values: Array onSelected: (index: number, value: T) => void onError?: (msg: string) => void @@ -102,6 +103,7 @@ interface ThrottleInterface { export class ToolsHelper { private constructor() { } + /** * 弹出Toast * @param msg @@ -233,7 +235,7 @@ export class ToolsHelper { } else { const dialogTag = ToolsHelper.getUuid() promptAction.openCustomDialog({ - alignment: DialogAlignment.Bottom, + alignment: options.alignment ?? DialogAlignment.Bottom, builder: customDialogBuilder.bind(p, options, dialogTag) }).then((dialogId: number) => { ToolsHelper.mapDialog.set(dialogTag, dialogId)