升级1.6.2,Modal自定义按钮支持异步回调
ChatList的AddIsBottom方法名修改为AddToBottom
This commit is contained in:
@@ -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
@@ -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;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user