问题描述
我正在使用 Ant Design Docs 构建 Blazor 应用程序Nuget
下面的代码在用户单击图像时显示一个弹出框,但是一旦显示了弹出框,我想触发一个 HTTP 请求,然后在收到响应时更新弹出框的内容。
之前版本的系统使用了ASP.NET MVC和Bootstrap,我使用了show.bs.popover
事件来触发请求,但是Ant popover似乎没有任何事件。
最好的方法是什么?
@if (Tracker.LatestLocationMessage is not null)
{
<Popover ContentTemplate="@PopoverContent" Title="what3words" Trigger="@(new[] { TriggerType.Click})" Placement="PlacementType.LeftTop">
<AntDesign.Button Type="link">
<img src="images/w3w.svg" width="18" height="18" title="what3words" alt="What 3 Words" />
</AntDesign.Button>
</Popover>
}
@code {
[Parameter]
public Tracker Tracker { get; set; }
private RenderFragment PopoverContent =>@<div><i class="fal fa-circle-notch fa-spin fa-lg"></i><span>Requesting words...</span></div>;
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)