升级1.6.2,Modal自定义按钮支持异步回调

ChatList的AddIsBottom方法名修改为AddToBottom
This commit is contained in:
czz_y
2024-09-23 17:18:47 +08:00
parent dff516c1e4
commit be234dadf6
5 changed files with 30 additions and 20 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ namespace AntdUIDemo.Views
#region 模拟GPT
var msg = new AntdUI.Chat.TextChatItem("", Properties.Resources.head, "2.0T 银");
bool isbut = chatList.AddIsBottom(msg);
bool isbut = chatList.AddToBottom(msg);
msg.Loading = true;
Thread.Sleep(1200);
+11 -1
View File
@@ -87,13 +87,23 @@ namespace AntdUIDemo.Views
OkText = "Search On Google",
OnOk = config =>
{
//执行耗时操作,仅OK按钮支持异步响应
Thread.Sleep(2000);
return true;
},
OnBtns = button =>
{
//1.6.2起,自定义按钮支持异步委托
Thread.Sleep(2000);
AntdUI.Message.info(window, button.Text, autoClose: 1);
switch (button.Text)
{
case "Return":
return false;
case "Submit":
return true;
default:
return true;
}
}
});
}