附加控件
# FastWeb附加控件
- 适用平台: APP(移动端)
附加控件中包含所有显示的文本提示框信息。
# 1. TUgSweetAlert
该组件用于显示弹窗提示。设定其中显示的文本后,在界面弹出时会显示相应的提示信息。
# 1.1. 属性
属性 | 说明 |
---|---|
AlertType | 设定对话框的类型 |
AllowEscapeKey | 是否允许响应ESC |
AllowOutesideClick | 是否允许响应对话框外侧的点击操作 |
Animation | 是否开启动画效果 |
CancelButtonColor | 取消按钮显示的颜色 |
CancelButtonText | 取消按钮显示的文字 |
ConfirmButtonColor | 确认按钮的颜色 |
ConfirmButtonText | 确认按钮的颜色 |
FocusCancel | 是否默认自动选择在取消按钮上 |
InputPlaceholder | 输入框中无内容时显示的内容 |
InputValue | 对话框中的输入内容显示在该界面中 |
InputType | 输入框的类型 |
ReverseButtons | 是否反转按钮 |
ShowCancelButton | 显示取消按钮 |
ShowCloseButton | 显示关闭按钮 |
ShowConfirmButton | 显示确认按钮 |
ShowLoaderButtonOnConfirm | 是否加载确认 |
Text | 对话框显示的文本 |
TitleText | 对话框的标题 |
# 1.1.1. AlterType
property AlertType: TAlertType;
1
该属性指定对话框的类型。
名称 | 说明 | 图例 |
---|---|---|
atInfo | 提示对话框 | |
atError | 错误对话框 | |
atQuestion | 疑问对话框 | |
atSuccess | 成功对话框 | |
atWarning | 警告对话框 |
# 1.1.2. AllowEscapeKey
property AllowEscapeKey: Boolean;
1
是否响应ESC按键。如果该项设置为True
,则对话框也可以响应ESC。
# 1.1.3. AllowOutsideClick
property AllowOutsideClick: Boolean;
1
是否允许不在对话框按钮进行点击操作以关闭对话框。
# 1.1.4. Animation
property Animation: Boolean;
1
是否开启对话框显示时的动画效果。
# 1.1.5. CancelButtonColor
property CancelButtonColor: TColor;
1
设定取消按钮的颜色。设置该属性需将ShowCancelButton
设置为True
。
# 1.1.6. CancelButtonText
property CancelButtonText: string;
1
设定取消按钮显示的文字内容。
# 1.1.7. ConfirmButtonColor
property ConfirmButtonColor: TColor;
1
设定确认按钮的颜色。设置该属性需将ShowConfirmButton
设置为True
。
# 1.1.8. ConfirmButtonText
property ConfirmButtonText: string;
1
设定确认按钮的文字。
# 1.1.9. FocusCancel
property FocusCancel: Boolean;
1
设置为True
,则对话框打开时,取消按钮默认选中。
# 1.1.10. InputPlaceholder
property InputPlaceholder: string;
1
该属性指定输入框为空时显示的内容。
# 1.1.11. InputType
property InputType: TInputType;
1
设定对话框中的输入类型。下面的设定中,包含了InputPlaceholder
的内容指定。
名称 | 说明 | 图例 |
---|---|---|
ItNone | 无输入框 | |
ItCheckBox | 复选框 | |
ItEmail | 邮箱地址输入框 | |
ItFile | 文件选择对话框 | |
ItNumber | 数字输入对话框 | |
ItPassWord | 密码输入对话框 | |
ItRange | 范围选择对话框 | |
ItSelect | 选择对话框 | |
ItTel | 电话输入对话框 | |
ItText | 文本输入框 | 图像同上 |
ItTextArea | 文本区域输入框 |
# 1.1.12. ReverseButtons
property ReverseButtons: Boolean;
1
是否对确认与取消按钮进行反转。使用该属性需要将确认按钮与取消按钮显示出来。即ShowCancelButton
为True
,ShowConfirmButton
为True
。
取值 | 图例 |
---|---|
True | |
False |
# 1.1.13. ShowCancelButton
property ShowCancelButton: Boolean;
1
该属性用于指定对话框中是否显示取消按钮。
# 1.1.14. ShowCloseButton
property ShowCloseButton: Boolean;
1
该属性用于指定对话框中是否显示关闭按钮。
# 1.1.15. ShowConfirmButton
property ShowConfirmButton: Boolean;
1
该属性用于指定对话框中是否显示确认按钮。
# 1.1.16. ShowLoaderButtonOnConfirm
property ShowLoaderOnConfirm: Boolean;
1
该属性用于指定在点击确认按钮时按钮是否显示为加载状态。
# 1.1.17. Text
property Text: string;
1
对话框中的文字区域的内容。
//JScript
UgSweetAlert01.Text = "Hello";
1
2
2
//PasScript
UgSweetAlert01.Text := 'Hello';
1
2
2
// Make sure to add code blocks to your code group
# 1.1.18. TitleText
property TitleText: string;
1
该属性用于指定对话框的标题。
//JScript
UgSweetAlert01.TitleText = "Hello";
1
2
2
//PasScript
UgSweetAlert01.TitleText := 'Hello';
1
2
2
// Make sure to add code blocks to your code group
# 1.2. 事件
名称 | 触发条件 |
---|---|
OnConfrim | 当按下确认按钮后触发该事件 |
OnDismiss | 当按下取消按钮后触发该事件 |
# 1.3. 方法
# 1.3.1. Execute
function Execute: Boolean;
1
该方法为执行操作。执行后将会打开对话框。
UgSweetAlert01.Execute;
1