Пример #1
0
 /// <summary>
 /// 明细行功能中切换行状态时调用此方法
 /// </summary>
 /// <param name="item"></param>
 protected EventCallback <MouseEventArgs> ExpandDetailRow(TItem item) => EventCallback.Factory.Create <MouseEventArgs>(this, () =>
 {
     DetailRows.Add(item);
     if (ExpandRows.Contains(item))
     {
         ExpandRows.Remove(item);
     }
     else
     {
         ExpandRows.Add(item);
     }
 });
Пример #2
0
 /// <summary>
 /// 明细行功能中切换行状态时调用此方法
 /// </summary>
 /// <param name="item"></param>
 public void ExpandDetailRow(TItem item)
 {
     DetailRows.Add(item);
     if (ExpandRows.Contains(item))
     {
         ExpandRows.Remove(item);
     }
     else
     {
         ExpandRows.Add(item);
     }
 }
Пример #3
0
 /// <summary>
 /// 获得明细行小图标样式
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 protected string?GetDetailCaretClassString(TItem item) => CssBuilder.Default("fa fa-caret-right")
 .AddClass("fa-rotate-90", ExpandRows.Contains(item))
 .Build();
Пример #4
0
 /// <summary>
 /// 获得明细行样式
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 protected string?GetDetailRowClassString(TItem item) => CssBuilder.Default("is-detail")
 .AddClass("show", ExpandRows.Contains(item))
 .Build();