|
@@ -28,6 +28,7 @@ export interface ConfirmOptions {
|
|
|
export interface ListOptions<T> {
|
|
|
title?: string
|
|
|
cancel?: Btn
|
|
|
+ alignment?: DialogAlignment
|
|
|
values: Array<T>
|
|
|
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)
|