feat(basic): 为列表对话框添加对齐方式设置
- 在 ListOptions 接口中添加 alignment 属性,用于设置对话框的对齐方式 - 修改 ToolsHelper 类中的 showListDialog 方法,支持根据 options.alignment 设置对齐方式
这个提交包含在:
父节点
cc73119a32
当前提交
45187bc8b6
@ -28,6 +28,7 @@ export interface ConfirmOptions {
|
|||||||
export interface ListOptions<T> {
|
export interface ListOptions<T> {
|
||||||
title?: string
|
title?: string
|
||||||
cancel?: Btn
|
cancel?: Btn
|
||||||
|
alignment?: DialogAlignment
|
||||||
values: Array<T>
|
values: Array<T>
|
||||||
onSelected: (index: number, value: T) => void
|
onSelected: (index: number, value: T) => void
|
||||||
onError?: (msg: string) => void
|
onError?: (msg: string) => void
|
||||||
@ -102,6 +103,7 @@ interface ThrottleInterface {
|
|||||||
export class ToolsHelper {
|
export class ToolsHelper {
|
||||||
private constructor() {
|
private constructor() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 弹出Toast
|
* 弹出Toast
|
||||||
* @param msg
|
* @param msg
|
||||||
@ -233,7 +235,7 @@ export class ToolsHelper {
|
|||||||
} else {
|
} else {
|
||||||
const dialogTag = ToolsHelper.getUuid()
|
const dialogTag = ToolsHelper.getUuid()
|
||||||
promptAction.openCustomDialog({
|
promptAction.openCustomDialog({
|
||||||
alignment: DialogAlignment.Bottom,
|
alignment: options.alignment ?? DialogAlignment.Bottom,
|
||||||
builder: customDialogBuilder.bind(p, options, dialogTag)
|
builder: customDialogBuilder.bind(p, options, dialogTag)
|
||||||
}).then((dialogId: number) => {
|
}).then((dialogId: number) => {
|
||||||
ToolsHelper.mapDialog.set(dialogTag, dialogId)
|
ToolsHelper.mapDialog.set(dialogTag, dialogId)
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户