Message, Modal, Notification支持设置内边距

This commit is contained in:
czz_y 2024-09-14 12:43:12 +08:00
parent b3e9e243a1
commit 42a7932065
3 changed files with 8 additions and 0 deletions

View File

@ -44,6 +44,7 @@ namespace AntdUIDemo.Views
case "Success": case "Success":
AntdUI.Message.loading(window, "加载中...", call: (config) => AntdUI.Message.loading(window, "加载中...", call: (config) =>
{ {
config.Padding = new Size(12, 9);
//执行一些耗时操作,暂不支持异步任务 //执行一些耗时操作,暂不支持异步任务
Thread.Sleep(2000); Thread.Sleep(2000);
config.Text = "加载配置..."; config.Text = "加载配置...";
@ -57,6 +58,7 @@ namespace AntdUIDemo.Views
case "Error": case "Error":
AntdUI.Message.loading(window, "加载中...", call: (config) => AntdUI.Message.loading(window, "加载中...", call: (config) =>
{ {
config.Padding = new Size(12, 9);
//执行一些耗时操作,暂不支持异步任务 //执行一些耗时操作,暂不支持异步任务
Thread.Sleep(2000); Thread.Sleep(2000);
config.Text = "加载配置..."; config.Text = "加载配置...";
@ -70,6 +72,7 @@ namespace AntdUIDemo.Views
case "Info": case "Info":
AntdUI.Message.loading(window, "加载中...", call: (config) => AntdUI.Message.loading(window, "加载中...", call: (config) =>
{ {
config.Padding = new Size(12, 9);
//执行一些耗时操作,暂不支持异步任务 //执行一些耗时操作,暂不支持异步任务
Thread.Sleep(2000); Thread.Sleep(2000);
config.Text = "加载配置..."; config.Text = "加载配置...";
@ -83,6 +86,7 @@ namespace AntdUIDemo.Views
case "Warn": case "Warn":
AntdUI.Message.loading(window, "加载中...", call: (config) => AntdUI.Message.loading(window, "加载中...", call: (config) =>
{ {
config.Padding = new Size(12, 9);
//执行一些耗时操作,暂不支持异步任务 //执行一些耗时操作,暂不支持异步任务
Thread.Sleep(2000); Thread.Sleep(2000);
config.Text = "加载配置..."; config.Text = "加载配置...";

View File

@ -111,6 +111,8 @@ namespace AntdUIDemo.Views
AntdUI.Modal.open(new AntdUI.Modal.Config(window, "Basic Modal", "Some contents...\r\nSome contents...\r\nSome contents...") AntdUI.Modal.open(new AntdUI.Modal.Config(window, "Basic Modal", "Some contents...\r\nSome contents...\r\nSome contents...")
{ {
Icon = TType.Info, Icon = TType.Info,
//内边距
Padding = new Size(24, 20),
}); });
} }
} }

View File

@ -44,6 +44,7 @@ namespace AntdUIDemo.Views
{ {
AntdUI.Notification.open(new AntdUI.Notification.Config(window, "Notification Title", "This is the content of the notification. This is the content of the notification. This is the content of the notification.", TType.Info, TAlignFrom.TR) AntdUI.Notification.open(new AntdUI.Notification.Config(window, "Notification Title", "This is the content of the notification. This is the content of the notification. This is the content of the notification.", TType.Info, TAlignFrom.TR)
{ {
Padding = new Size(24, 20),
CloseIcon = false, CloseIcon = false,
Link = new Notification.ConfigLink("Link to...", new Action(() => Link = new Notification.ConfigLink("Link to...", new Action(() =>
{ {
@ -56,6 +57,7 @@ namespace AntdUIDemo.Views
{ {
AntdUI.Notification.open(new AntdUI.Notification.Config(window, "Notification Title", "This is the content of the notification. This is the content of the notification. This is the content of the notification.", TType.Info, TAlignFrom.TR) AntdUI.Notification.open(new AntdUI.Notification.Config(window, "Notification Title", "This is the content of the notification. This is the content of the notification. This is the content of the notification.", TType.Info, TAlignFrom.TR)
{ {
Padding = new Size(24, 20),
CloseIcon = false, CloseIcon = false,
}); });
} }