mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-04 04:58:05 +08:00
refactor(module: all): separate the normal and template parameters (#552)
* fix: card title template * fix: template:badge,collapse * fix: comment refactor template * fix: ribbonTests * feat: descriptions refactor template * feat: empty refactor template * feat: list refactor template * feat: menu refactor template * feat: confirm add question icon * feat: pageHeader and statistic refactor template * feat: popconfirm refactor template * feat: popver refactor template * feat: result refactor template * feat: step refactor template * feat: switch refactor template * feat: table refactor template * feat: transfer refactor template * feat: optimized code * fix: pageheader * refactor(module: empty): remove empty image constant images Co-authored-by: ElderJames <shunjiey@hotmail.com>
This commit is contained in:
parent
451114b0d2
commit
cbc5e823f0
@ -27,16 +27,12 @@
|
|||||||
{
|
{
|
||||||
<span class="ant-badge-status-text">@Text</span>
|
<span class="ant-badge-status-text">@Text</span>
|
||||||
}
|
}
|
||||||
@if (CountTemplate != null)
|
if (_showSup)
|
||||||
{
|
{
|
||||||
@CountTemplate
|
<sup class="@CountClassMapper.Class" style="@CountStyle @Style" title="@Count">
|
||||||
}
|
|
||||||
else if (_showSup)
|
|
||||||
{
|
|
||||||
<sup class="@CountClassMapper.Class" style="@CountStyle @Style" title="@CountNumber">
|
|
||||||
@if (!Dot)
|
@if (!Dot)
|
||||||
{
|
{
|
||||||
@if (CountNumber <= OverflowCount)
|
@if (Count <= OverflowCount)
|
||||||
{
|
{
|
||||||
@for (int i = 0; i < _maxNumberArray.Length; i++)
|
@for (int i = 0; i < _maxNumberArray.Length; i++)
|
||||||
{
|
{
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
using Microsoft.AspNetCore.Components;
|
using System;
|
||||||
using OneOf;
|
|
||||||
using System;
|
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
using OneOf;
|
||||||
|
|
||||||
namespace AntDesign
|
namespace AntDesign
|
||||||
{
|
{
|
||||||
@ -22,7 +22,10 @@ namespace AntDesign
|
|||||||
/// Number to show in badge
|
/// Number to show in badge
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<int?, RenderFragment> Count { get; set; }
|
public int? Count { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment CountTemplate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether to display a red dot instead of count
|
/// Whether to display a red dot instead of count
|
||||||
@ -75,10 +78,6 @@ namespace AntDesign
|
|||||||
[Parameter]
|
[Parameter]
|
||||||
public RenderFragment ChildContent { get; set; }
|
public RenderFragment ChildContent { get; set; }
|
||||||
|
|
||||||
private int? CountNumber { get; set; }
|
|
||||||
|
|
||||||
private RenderFragment CountTemplate { get; set; }
|
|
||||||
|
|
||||||
private ClassMapper CountClassMapper { get; set; } = new ClassMapper();
|
private ClassMapper CountClassMapper { get; set; } = new ClassMapper();
|
||||||
|
|
||||||
private int[] _countArray = Array.Empty<int>();
|
private int[] _countArray = Array.Empty<int>();
|
||||||
@ -95,8 +94,8 @@ namespace AntDesign
|
|||||||
|
|
||||||
private string CountStyle => Offset == default ? null : $"{(Offset.Item1 > 0 ? $"right:-{Offset.Item1}px" : "")};{(Offset.Item2 > 0 ? $"margin-top:{Offset.Item2}px" : "")};";
|
private string CountStyle => Offset == default ? null : $"{(Offset.Item1 > 0 ? $"right:-{Offset.Item1}px" : "")};{(Offset.Item2 > 0 ? $"margin-top:{Offset.Item2}px" : "")};";
|
||||||
|
|
||||||
private bool ShowSup => (this.ShowDot && this.Dot) || this.CountNumber > 0 ||
|
private bool ShowSup => (this.ShowDot && this.Dot) || this.Count > 0 ||
|
||||||
(this.CountNumber == 0 && this.ShowZero);
|
(this.Count == 0 && this.ShowZero);
|
||||||
|
|
||||||
private bool _dotEnter;
|
private bool _dotEnter;
|
||||||
|
|
||||||
@ -193,17 +192,10 @@ namespace AntDesign
|
|||||||
base.OnParametersSet();
|
base.OnParametersSet();
|
||||||
SetClassMap();
|
SetClassMap();
|
||||||
|
|
||||||
Count.Switch(count =>
|
if (Count.HasValue)
|
||||||
{
|
{
|
||||||
this.CountNumber = count;
|
this._countArray = DigitsFromInteger(Count.Value);
|
||||||
if (count != null)
|
}
|
||||||
{
|
|
||||||
this._countArray = DigitsFromInteger(count.Value);
|
|
||||||
}
|
|
||||||
}, template =>
|
|
||||||
{
|
|
||||||
this.CountTemplate = template;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (OverflowCount > 0)
|
if (OverflowCount > 0)
|
||||||
{
|
{
|
||||||
|
@ -6,15 +6,8 @@
|
|||||||
{
|
{
|
||||||
@ChildContent
|
@ChildContent
|
||||||
}
|
}
|
||||||
<div class="@ClassMapper.Class" style="@colorStyle">
|
<div class="@ClassMapper.Class" style="@_colorStyle">
|
||||||
@if (Text.IsT0)
|
@if (TextTemplate != null)@TextTemplate else @Text
|
||||||
{
|
<div class="ant-ribbon-corner" style="@_cornerColorStyle" />
|
||||||
@Text.AsT0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@Text.AsT1
|
|
||||||
}
|
|
||||||
<div class="ant-ribbon-corner" style="@cornerColorStyle"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
@ -1,4 +1,4 @@
|
|||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using OneOf;
|
using OneOf;
|
||||||
|
|
||||||
namespace AntDesign
|
namespace AntDesign
|
||||||
@ -18,7 +18,10 @@ namespace AntDesign
|
|||||||
/// Set text contents of ribbon.
|
/// Set text contents of ribbon.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Text { get; set; }
|
public string Text { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment TextTemplate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set placement of ribbon.
|
/// Set placement of ribbon.
|
||||||
@ -35,9 +38,9 @@ namespace AntDesign
|
|||||||
|
|
||||||
private string PresetColor => Color.IsIn(_badgePresetColors) ? Color : null;
|
private string PresetColor => Color.IsIn(_badgePresetColors) ? Color : null;
|
||||||
|
|
||||||
private string colorStyle;
|
private string _colorStyle;
|
||||||
|
|
||||||
private string cornerColorStyle;
|
private string _cornerColorStyle;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the default CSS classes.
|
/// Sets the default CSS classes.
|
||||||
@ -58,13 +61,13 @@ namespace AntDesign
|
|||||||
{
|
{
|
||||||
if (PresetColor == null && !string.IsNullOrWhiteSpace(Color))
|
if (PresetColor == null && !string.IsNullOrWhiteSpace(Color))
|
||||||
{
|
{
|
||||||
colorStyle = $"background:{Color}; {Style}";
|
_colorStyle = $"background:{Color}; {Style}";
|
||||||
cornerColorStyle = $"color:{Color}; {Style}";
|
_cornerColorStyle = $"color:{Color}; {Style}";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
colorStyle = Style;
|
_colorStyle = Style;
|
||||||
cornerColorStyle = Style;
|
_cornerColorStyle = Style;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,22 +3,15 @@
|
|||||||
|
|
||||||
<CascadingValue Value="this">
|
<CascadingValue Value="this">
|
||||||
<div class="@ClassMapper.Class" style="@Style" id="@Id">
|
<div class="@ClassMapper.Class" style="@Style" id="@Id">
|
||||||
@if (Title.Value != null || Extra != null || AntCardTab != null)
|
@if (TitleTemplate != null || Title != null || Extra != null || AntCardTab != null)
|
||||||
{
|
{
|
||||||
<div class="ant-card-head">
|
<div class="ant-card-head">
|
||||||
<div class="ant-card-head-wrapper">
|
<div class="ant-card-head-wrapper">
|
||||||
@if (Title.Value != null)
|
@if (TitleTemplate != null || Title != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
<div class="ant-card-head-title">
|
<div class="ant-card-head-title">
|
||||||
@if (Title.IsT0)
|
@if (TitleTemplate != null)@TitleTemplate else @Title
|
||||||
{
|
|
||||||
@Title.AsT0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@Title.AsT1
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@if (Extra != null)
|
@if (Extra != null)
|
||||||
|
@ -37,7 +37,10 @@ namespace AntDesign
|
|||||||
public string Size { get; set; }
|
public string Size { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Title { get; set; }
|
public string Title { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment TitleTemplate { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public RenderFragment Extra { get; set; }
|
public RenderFragment Extra { get; set; }
|
||||||
|
@ -27,7 +27,10 @@ namespace AntDesign
|
|||||||
public EventCallback<string[]> OnChange { get; set; }
|
public EventCallback<string[]> OnChange { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<bool, RenderFragment<bool>> ExpandIcon { get; set; } = true;
|
public string ExpandIcon { get; set; } = "right";
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment<bool> ExpandIconTemplate { get; set; }
|
||||||
|
|
||||||
#endregion Parameter
|
#endregion Parameter
|
||||||
|
|
||||||
|
@ -5,36 +5,22 @@
|
|||||||
<div class="ant-collapse-header" @onclick="OnClickHeader">
|
<div class="ant-collapse-header" @onclick="OnClickHeader">
|
||||||
@if (ShowArrow)
|
@if (ShowArrow)
|
||||||
{
|
{
|
||||||
@if (Collapse.ExpandIcon.IsT0 && Collapse.ExpandIcon.AsT0)
|
@if (Collapse.ExpandIconTemplate != null)
|
||||||
{
|
{
|
||||||
<Icon Type="right" Theme="outline" Class="ant-collapse-arrow" Rotate="@(Active ? 90 : 0)" />
|
@Collapse.ExpandIconTemplate(Active)
|
||||||
}
|
}
|
||||||
else if (Collapse.ExpandIcon.AsT1 != null)
|
else
|
||||||
{
|
{
|
||||||
@Collapse.ExpandIcon.AsT1(Active)
|
<Icon Type="@Collapse.ExpandIcon" Class="ant-collapse-arrow" Rotate="@(Active ? 90 : 0)" />
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (Header.IsT0)
|
@if (HeaderTemplate != null)@HeaderTemplate else @Header
|
||||||
{
|
|
||||||
@Header.AsT0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@Header.AsT1
|
|
||||||
}
|
|
||||||
|
|
||||||
@if (Extra.Value != null)
|
@if (Extra != null || ExtraTemplate != null)
|
||||||
{
|
{
|
||||||
<div class="ant-collapse-extra">
|
<div class="ant-collapse-extra">
|
||||||
@if (Extra.IsT0)
|
@if (ExtraTemplate != null)@ExtraTemplate else @Extra
|
||||||
{
|
|
||||||
@Extra.AsT0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@Extra.AsT1
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
@ -22,10 +22,16 @@ namespace AntDesign
|
|||||||
public bool ShowArrow { get; set; } = true;
|
public bool ShowArrow { get; set; } = true;
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Extra { get; set; }
|
public string Extra { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Header { get; set; }
|
public RenderFragment ExtraTemplate { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string Header { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment HeaderTemplate { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public EventCallback<bool> OnActiveChange { get; set; }
|
public EventCallback<bool> OnActiveChange { get; set; }
|
||||||
|
@ -4,55 +4,59 @@
|
|||||||
<CascadingValue Value="this">
|
<CascadingValue Value="this">
|
||||||
<div class="@ClassMapper.Class" style="@Style" id="@Id">
|
<div class="@ClassMapper.Class" style="@Style" id="@Id">
|
||||||
<div class="ant-comment-inner">
|
<div class="ant-comment-inner">
|
||||||
@if (Avatar.Value != null && Content.Value != null)
|
@if ((Avatar != null || AvatarTemplate != null) && (Content != null || ContentTemplate != null))
|
||||||
{
|
{
|
||||||
<div class="ant-comment-avatar">
|
<div class="ant-comment-avatar">
|
||||||
@if (Avatar.IsT0)
|
@if (AvatarTemplate != null)
|
||||||
{
|
{
|
||||||
<Avatar Src="@Avatar.AsT0" />
|
@AvatarTemplate
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@Avatar.AsT1
|
<Avatar Src="@Avatar" />
|
||||||
|
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div class="ant-comment-content">
|
<div class="ant-comment-content">
|
||||||
<div class="ant-comment-content-author">
|
<div class="ant-comment-content-author">
|
||||||
@if (Author.Value != null)
|
@if (Author != null || AuthorTemplate != null)
|
||||||
{
|
{
|
||||||
<span class="ant-comment-content-author-name">
|
<span class="ant-comment-content-author-name">
|
||||||
@if (Author.IsT0)
|
|
||||||
|
@if (AuthorTemplate != null)
|
||||||
{
|
{
|
||||||
<a>@Author.AsT0</a>
|
@AuthorTemplate
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@Author.AsT1
|
<a>@Author</a>
|
||||||
}
|
}
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
@if (Datetime.Value != null)
|
|
||||||
|
@if (Datetime != null || DatetimeTemplate != null)
|
||||||
{
|
{
|
||||||
<span class="ant-comment-content-author-time">
|
<span class="ant-comment-content-author-time">
|
||||||
@if (Datetime.IsT0)
|
@if (DatetimeTemplate != null)
|
||||||
{
|
{
|
||||||
<span>@Datetime.AsT0</span>
|
@DatetimeTemplate
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@Datetime.AsT1
|
<span>@Datetime</span>
|
||||||
}
|
}
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div class="ant-comment-content-detail">
|
<div class="ant-comment-content-detail">
|
||||||
@if (Content.IsT0)
|
@if (ContentTemplate != null)
|
||||||
{
|
{
|
||||||
<p>@Content.AsT0</p>
|
@ContentTemplate
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@Content.AsT1
|
<p>@Content</p>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@if (Actions.Count > 0)
|
@if (Actions.Count > 0)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using Microsoft.AspNetCore.Components;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
using OneOf;
|
using OneOf;
|
||||||
|
|
||||||
namespace AntDesign
|
namespace AntDesign
|
||||||
@ -10,19 +10,31 @@ namespace AntDesign
|
|||||||
public partial class Comment : AntDomComponentBase
|
public partial class Comment : AntDomComponentBase
|
||||||
{
|
{
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Author { get; set; }
|
public string Author { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Avatar { get; set; }
|
public RenderFragment AuthorTemplate { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Content { get; set; }
|
public string Avatar { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment AvatarTemplate { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string Content { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment ContentTemplate { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public RenderFragment ChildContent { get; set; }
|
public RenderFragment ChildContent { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Datetime { get; set; }
|
public string Datetime { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment DatetimeTemplate { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public IList<RenderFragment> Actions { get; set; } = new List<RenderFragment>();
|
public IList<RenderFragment> Actions { get; set; } = new List<RenderFragment>();
|
||||||
|
@ -6,18 +6,10 @@
|
|||||||
</CascadingValue>
|
</CascadingValue>
|
||||||
|
|
||||||
<div @ref="@_divRef" class="@ClassMapper.Class" style="@Style" id="@Id">
|
<div @ref="@_divRef" class="@ClassMapper.Class" style="@Style" id="@Id">
|
||||||
@if (Title.Value != null)
|
@if (Title != null || TitleTemplate != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
<div class="ant-descriptions-title">
|
<div class="ant-descriptions-title">
|
||||||
@if (Title.IsT0)
|
@if (TitleTemplate != null)@TitleTemplate else @Title
|
||||||
{
|
|
||||||
@Title.AsT0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@Title.AsT1
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
<div class="ant-descriptions-view">
|
<div class="ant-descriptions-view">
|
||||||
@ -36,14 +28,8 @@
|
|||||||
<!-- Horizontal & NOT Bordered -->
|
<!-- Horizontal & NOT Bordered -->
|
||||||
<td class="ant-descriptions-item" colspan="@item.realSpan">
|
<td class="ant-descriptions-item" colspan="@item.realSpan">
|
||||||
<span class="ant-descriptions-item-label @(Colon ? "ant-descriptions-item-colon" : null)">
|
<span class="ant-descriptions-item-label @(Colon ? "ant-descriptions-item-colon" : null)">
|
||||||
@if (item.item.Title.IsT0)
|
|
||||||
{
|
@if (item.item.TitleTemplate != null)@item.item.TitleTemplate else @item.item.Title
|
||||||
@item.item.Title.AsT0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@item.item.Title.AsT1
|
|
||||||
}
|
|
||||||
</span>
|
</span>
|
||||||
<span class="ant-descriptions-item-content">
|
<span class="ant-descriptions-item-content">
|
||||||
@item.item.ChildContent
|
@item.item.ChildContent
|
||||||
@ -55,14 +41,7 @@
|
|||||||
{
|
{
|
||||||
<!-- Horizontal & Bordered -->
|
<!-- Horizontal & Bordered -->
|
||||||
<td class="ant-descriptions-item-label">
|
<td class="ant-descriptions-item-label">
|
||||||
@if (item.item.Title.IsT0)
|
@if (item.item.TitleTemplate != null)@item.item.TitleTemplate else @item.item.Title
|
||||||
{
|
|
||||||
@item.item.Title.AsT0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@item.item.Title.AsT1
|
|
||||||
}
|
|
||||||
</td>
|
</td>
|
||||||
<td class="ant-descriptions-item-content" colspan="@item.realSpan * 2 - 1">
|
<td class="ant-descriptions-item-content" colspan="@item.realSpan * 2 - 1">
|
||||||
@item.item.ChildContent
|
@item.item.ChildContent
|
||||||
@ -84,14 +63,7 @@
|
|||||||
{
|
{
|
||||||
<td class="ant-descriptions-item" colspan="@item.realSpan">
|
<td class="ant-descriptions-item" colspan="@item.realSpan">
|
||||||
<span class="ant-descriptions-item-label @(Colon ? "ant-descriptions-item-colon" : null)">
|
<span class="ant-descriptions-item-label @(Colon ? "ant-descriptions-item-colon" : null)">
|
||||||
@if (item.item.Title.IsT0)
|
@if (item.item.TitleTemplate != null)@item.item.TitleTemplate else @item.item.Title
|
||||||
{
|
|
||||||
@item.item.Title.AsT0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@item.item.Title.AsT1
|
|
||||||
}
|
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
}
|
}
|
||||||
@ -117,14 +89,7 @@
|
|||||||
@foreach (var item in row)
|
@foreach (var item in row)
|
||||||
{
|
{
|
||||||
<td class="ant-descriptions-item-label" colspan="@item.realSpan">
|
<td class="ant-descriptions-item-label" colspan="@item.realSpan">
|
||||||
@if (item.item.Title.IsT0)
|
@if (item.item.TitleTemplate != null)@item.item.TitleTemplate else @item.item.Title
|
||||||
{
|
|
||||||
@item.item.Title.AsT0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@item.item.Title.AsT1
|
|
||||||
}
|
|
||||||
</td>
|
</td>
|
||||||
}
|
}
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -29,7 +29,10 @@ namespace AntDesign
|
|||||||
public string Size { get; set; }
|
public string Size { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Title { get; set; }
|
public string Title { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment TitleTemplate { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public bool Colon { get; set; }
|
public bool Colon { get; set; }
|
||||||
|
@ -10,7 +10,10 @@ namespace AntDesign
|
|||||||
public partial class DescriptionsItem : AntDomComponentBase, IDescriptionsItem
|
public partial class DescriptionsItem : AntDomComponentBase, IDescriptionsItem
|
||||||
{
|
{
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Title { get; set; } = "";
|
public string Title { get; set; } = "";
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment TitleTemplate { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public int Span { get; set; } = 1;
|
public int Span { get; set; } = 1;
|
||||||
|
@ -9,7 +9,10 @@ namespace AntDesign
|
|||||||
public interface IDescriptionsItem
|
public interface IDescriptionsItem
|
||||||
{
|
{
|
||||||
[Parameter]
|
[Parameter]
|
||||||
OneOf<string, RenderFragment> Title { get; set; }
|
string Title { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
RenderFragment TitleTemplate { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
int Span { get; set; }
|
int Span { get; set; }
|
||||||
|
@ -3,42 +3,35 @@
|
|||||||
|
|
||||||
<div class="@ClassMapper.Class" @ref="@Ref" style="@Style" id="@Id">
|
<div class="@ClassMapper.Class" @ref="@Ref" style="@Style" id="@Id">
|
||||||
<div class="@(PrefixCls)-image" style="@ImageStyle">
|
<div class="@(PrefixCls)-image" style="@ImageStyle">
|
||||||
@if (Image.IsT0 && !string.IsNullOrEmpty(Image.AsT0))
|
@if (ImageTemplate != null)
|
||||||
{
|
{
|
||||||
Description.TryPickT0(out string des, out _);
|
@ImageTemplate
|
||||||
string alt = !string.IsNullOrEmpty(des) ? des : "empty";
|
}
|
||||||
<img alt="@alt" src="@Image.AsT0" />
|
else if (string.IsNullOrEmpty(Image) == false)
|
||||||
|
{
|
||||||
|
string alt = Description.TryPickT0(out string des, out _) ? des : LocaleProvider.CurrentLocale.Empty.Description;
|
||||||
|
|
||||||
|
<img alt="@alt" src="@Image" />
|
||||||
}
|
}
|
||||||
else if (Simple)
|
else if (Simple)
|
||||||
{
|
{
|
||||||
@PRESENTED_IMAGE_SIMPLE
|
<EmptySimpleImg />
|
||||||
}
|
|
||||||
else if (Image.IsT1 && Image.AsT1 != null)
|
|
||||||
{
|
|
||||||
@Image.AsT1
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@PRESENTED_IMAGE_DEFAULT
|
<EmptyDefaultImg />
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if (Description.IsT0 && !string.IsNullOrEmpty(Description.AsT0))
|
@if (DescriptionTemplate != null)
|
||||||
|
{
|
||||||
|
<p class="@(PrefixCls)-description">@DescriptionTemplate</p>
|
||||||
|
}
|
||||||
|
else if (Description.IsT1 == false || Description.AsT1 == true)
|
||||||
{
|
{
|
||||||
<p class="@(PrefixCls)-description">@Description.AsT0</p>
|
<p class="@(PrefixCls)-description">@Description.AsT0</p>
|
||||||
}
|
}
|
||||||
@if (Description.IsT2 && Description.AsT2 != null)
|
|
||||||
{
|
|
||||||
<p class="@(PrefixCls)-description">@Description.AsT2</p>
|
|
||||||
}
|
|
||||||
<div class="@(PrefixCls)-footer">
|
<div class="@(PrefixCls)-footer">
|
||||||
@ChildContent
|
@ChildContent
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@code
|
|
||||||
{
|
|
||||||
public static RenderFragment PRESENTED_IMAGE_DEFAULT =@<EmptyDefaultImg />;
|
|
||||||
|
|
||||||
public static RenderFragment PRESENTED_IMAGE_SIMPLE = @<EmptySimpleImg />;
|
|
||||||
}
|
|
@ -27,17 +27,23 @@ namespace AntDesign
|
|||||||
public RenderFragment ChildContent { get; set; }
|
public RenderFragment ChildContent { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, bool, RenderFragment> Description { get; set; } = LocaleProvider.CurrentLocale.Empty.Description;
|
public OneOf<string, bool?> Description { get; set; } = LocaleProvider.CurrentLocale.Empty.Description;
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Image { get; set; } = Empty.PRESENTED_IMAGE_DEFAULT;
|
public RenderFragment DescriptionTemplate { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string Image { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment ImageTemplate { get; set; }
|
||||||
|
|
||||||
protected void SetClass()
|
protected void SetClass()
|
||||||
{
|
{
|
||||||
this.ClassMapper.Clear()
|
this.ClassMapper.Clear()
|
||||||
.Add(PrefixCls)
|
.Add(PrefixCls)
|
||||||
.If($"{PrefixCls}-normal", () => Image.IsT1 && Image.AsT1 == Empty.PRESENTED_IMAGE_SIMPLE)
|
.If($"{PrefixCls}-normal", () => Simple)
|
||||||
.If($"{PrefixCls}-{Direction}", () => Direction.IsIn("ltr", "rlt"))
|
.GetIf(() => $"{PrefixCls}-{Direction}", () => Direction.IsIn("ltr", "rlt"))
|
||||||
.If($"{PrefixCls}-small", () => Small)
|
.If($"{PrefixCls}-small", () => Small)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@ -46,10 +52,5 @@ namespace AntDesign
|
|||||||
{
|
{
|
||||||
this.SetClass();
|
this.SetClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnParametersSet()
|
|
||||||
{
|
|
||||||
this.SetClass();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,17 +3,16 @@
|
|||||||
|
|
||||||
<div class="@ClassMapper.Class" style="@Style">
|
<div class="@ClassMapper.Class" style="@Style">
|
||||||
|
|
||||||
@if (Avatar.IsT0 && Avatar.AsT0 != "")
|
@if (AvatarTemplate != null)
|
||||||
{
|
{
|
||||||
<div class="ant-list-item-meta-avatar">
|
<div class="ant-list-item-meta-avatar">
|
||||||
<Avatar Src="@Avatar.AsT0"></Avatar>
|
@AvatarTemplate
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
else if (Avatar == null)
|
||||||
@if (Avatar.IsT1 && Avatar.AsT1 != null)
|
|
||||||
{
|
{
|
||||||
<div class="ant-list-item-meta-avatar">
|
<div class="ant-list-item-meta-avatar">
|
||||||
@Avatar.AsT1
|
<Avatar Src="@Avatar"></Avatar>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,30 +28,3 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@code{
|
|
||||||
public string PrefixName { get; set; } = "ant-list-item-meta";
|
|
||||||
|
|
||||||
[Parameter] public RenderFragment Title { get; set; }
|
|
||||||
|
|
||||||
[Parameter] public OneOf.OneOf<string, RenderFragment> Avatar { get; set; }
|
|
||||||
|
|
||||||
[Parameter] public string Description { get; set; }
|
|
||||||
|
|
||||||
protected override void OnInitialized()
|
|
||||||
{
|
|
||||||
base.OnInitialized();
|
|
||||||
SetClassMap();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnParametersSet()
|
|
||||||
{
|
|
||||||
base.OnParametersSet();
|
|
||||||
SetClassMap();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void SetClassMap()
|
|
||||||
{
|
|
||||||
ClassMapper.Clear()
|
|
||||||
.Add(PrefixName);
|
|
||||||
}
|
|
||||||
}
|
|
40
components/list/AntListItemMeta.razor.cs
Normal file
40
components/list/AntListItemMeta.razor.cs
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
||||||
|
namespace AntDesign
|
||||||
|
{
|
||||||
|
public partial class AntListItemMeta
|
||||||
|
{
|
||||||
|
|
||||||
|
public string PrefixName { get; set; } = "ant-list-item-meta";
|
||||||
|
|
||||||
|
[Parameter] public RenderFragment Title { get; set; }
|
||||||
|
|
||||||
|
[Parameter] public string Avatar { get; set; }
|
||||||
|
|
||||||
|
[Parameter] public RenderFragment AvatarTemplate { get; set; }
|
||||||
|
|
||||||
|
[Parameter] public string Description { get; set; }
|
||||||
|
|
||||||
|
protected override void OnInitialized()
|
||||||
|
{
|
||||||
|
base.OnInitialized();
|
||||||
|
SetClassMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnParametersSet()
|
||||||
|
{
|
||||||
|
base.OnParametersSet();
|
||||||
|
SetClassMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void SetClassMap()
|
||||||
|
{
|
||||||
|
ClassMapper.Clear()
|
||||||
|
.Add(PrefixName);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -3,17 +3,7 @@
|
|||||||
|
|
||||||
<li class="@(RootMenu.PrefixCls)-item-group" style="@Style" @key="Key">
|
<li class="@(RootMenu.PrefixCls)-item-group" style="@Style" @key="Key">
|
||||||
<div class="@(RootMenu.PrefixCls)-item-group-title">
|
<div class="@(RootMenu.PrefixCls)-item-group-title">
|
||||||
@if (Title.Value != null)
|
@if (TitleTemplate != null)@TitleTemplate else @Title
|
||||||
{
|
|
||||||
@if (Title.IsT0)
|
|
||||||
{
|
|
||||||
@Title.AsT0
|
|
||||||
}
|
|
||||||
else if (Title.IsT1)
|
|
||||||
{
|
|
||||||
@Title.AsT1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
<ul class="@(RootMenu.PrefixCls)-item-group-list">
|
<ul class="@(RootMenu.PrefixCls)-item-group-list">
|
||||||
@ChildContent
|
@ChildContent
|
||||||
|
@ -14,7 +14,10 @@ namespace AntDesign
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Title { get; set; }
|
public string Title { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment TitleTemplate { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public RenderFragment ChildContent { get; set; }
|
public RenderFragment ChildContent { get; set; }
|
||||||
|
@ -10,16 +10,14 @@
|
|||||||
{
|
{
|
||||||
<li class="@ClassMapper.Class" role="menuitem" @key="Key" style="position:relative;@Style">
|
<li class="@ClassMapper.Class" role="menuitem" @key="Key" style="position:relative;@Style">
|
||||||
<div class="@(prefixCls)-title" style="padding-left: @(PaddingLeft)px; " role="button" @onclick="HandleOnTitleClick" aria-haspopup="true">
|
<div class="@(prefixCls)-title" style="padding-left: @(PaddingLeft)px; " role="button" @onclick="HandleOnTitleClick" aria-haspopup="true">
|
||||||
|
@if (TitleTemplate != null)
|
||||||
@if (Title.IsT0)
|
|
||||||
{
|
{
|
||||||
<span>@Title.AsT0</span>
|
@TitleTemplate
|
||||||
}
|
}
|
||||||
else
|
else if (Title != null)
|
||||||
{
|
{
|
||||||
@Title.AsT1
|
<span>@Title</span>
|
||||||
}
|
}
|
||||||
|
|
||||||
<i class="@(prefixCls)-arrow"></i>
|
<i class="@(prefixCls)-arrow"></i>
|
||||||
</div>
|
</div>
|
||||||
<ul direction="ltr" class="@SubMenuMapper.Class" role="menu" aria-expanded="@IsOpen">
|
<ul direction="ltr" class="@SubMenuMapper.Class" role="menu" aria-expanded="@IsOpen">
|
||||||
@ -47,15 +45,14 @@ else
|
|||||||
OverlayHiddenCls="@($"{RootMenu.PrefixCls}-hidden")">
|
OverlayHiddenCls="@($"{RootMenu.PrefixCls}-hidden")">
|
||||||
<ChildContent>
|
<ChildContent>
|
||||||
<div class="@(prefixCls)-title" role="button">
|
<div class="@(prefixCls)-title" role="button">
|
||||||
@if (Title.IsT0)
|
@if (TitleTemplate != null)
|
||||||
{
|
{
|
||||||
<span>@Title.AsT0</span>
|
@TitleTemplate
|
||||||
}
|
}
|
||||||
else
|
else if (Title != null)
|
||||||
{
|
{
|
||||||
@Title.AsT1
|
<span>@Title</span>
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetArrow()
|
@GetArrow()
|
||||||
</div>
|
</div>
|
||||||
</ChildContent>
|
</ChildContent>
|
||||||
@ -97,14 +94,14 @@ else
|
|||||||
if (RootMenu.PrefixCls.Contains("dropdown"))
|
if (RootMenu.PrefixCls.Contains("dropdown"))
|
||||||
{
|
{
|
||||||
return@<span class="@(prefixCls)-arrow">
|
return@<span class="@(prefixCls)-arrow">
|
||||||
<span role="img" aria-label="right" class="anticon anticon-right @(prefixCls)-arrow-icon">
|
<span role="img" aria-label="right" class="anticon anticon-right @(prefixCls)-arrow-icon">
|
||||||
<svg viewBox="64 64 896 896" focusable="false" class="" data-icon="right" width="1em" height="1em" fill="currentColor" aria-hidden="true">
|
<svg viewBox="64 64 896 896" focusable="false" class="" data-icon="right" width="1em" height="1em" fill="currentColor" aria-hidden="true">
|
||||||
<path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"></path>
|
<path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"></path>
|
||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
</span>;
|
</span>;
|
||||||
}
|
}
|
||||||
|
|
||||||
return @<i class="@(prefixCls)-arrow"></i>;
|
return @<i class="@(prefixCls)-arrow"></i>;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -17,7 +17,10 @@ namespace AntDesign
|
|||||||
public SubMenu Parent { get; set; }
|
public SubMenu Parent { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Title { get; set; }
|
public string Title { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment TitleTemplate { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public RenderFragment ChildContent { get; set; }
|
public RenderFragment ChildContent { get; set; }
|
||||||
|
@ -14,7 +14,8 @@ namespace AntDesign
|
|||||||
Info = 1,
|
Info = 1,
|
||||||
Warning = 2,
|
Warning = 2,
|
||||||
Error = 3,
|
Error = 3,
|
||||||
Success = 4
|
Success = 4,
|
||||||
|
Question = 5,
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static class ConfirmIconRenderFragments
|
internal static class ConfirmIconRenderFragments
|
||||||
@ -51,6 +52,15 @@ namespace AntDesign
|
|||||||
builder.CloseComponent();
|
builder.CloseComponent();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public static RenderFragment Question = (builder) =>
|
||||||
|
{
|
||||||
|
builder.OpenComponent<Icon>(0);
|
||||||
|
builder.AddAttribute(1, "Type", "question-circle");
|
||||||
|
builder.AddAttribute(2, "Theme", "outline");
|
||||||
|
builder.CloseComponent();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
public static RenderFragment GetByConfirmIcon(ConfirmIcon confirmIcon)
|
public static RenderFragment GetByConfirmIcon(ConfirmIcon confirmIcon)
|
||||||
{
|
{
|
||||||
switch (confirmIcon)
|
switch (confirmIcon)
|
||||||
@ -59,6 +69,7 @@ namespace AntDesign
|
|||||||
case ConfirmIcon.Warning: return Warning;
|
case ConfirmIcon.Warning: return Warning;
|
||||||
case ConfirmIcon.Error: return Error;
|
case ConfirmIcon.Error: return Error;
|
||||||
case ConfirmIcon.Success: return Success;
|
case ConfirmIcon.Success: return Success;
|
||||||
|
case ConfirmIcon.Question: return Question;
|
||||||
default: return null;
|
default: return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,13 +8,13 @@
|
|||||||
<div class="ant-page-header-heading">
|
<div class="ant-page-header-heading">
|
||||||
<div class="ant-page-header-heading-left">
|
<div class="ant-page-header-heading-left">
|
||||||
<!--back-->
|
<!--back-->
|
||||||
@if (BackIcon.Value != null || OnBack.HasDelegate)
|
@if (BackIconTemplate != null || BackIcon.Value != null || OnBack.HasDelegate)
|
||||||
{
|
{
|
||||||
<div @onclick="OnBackClick" class="ant-page-header-back">
|
<div @onclick="OnBackClick" class="ant-page-header-back">
|
||||||
<div role="button" tabindex="0" class="ant-page-header-back-button">
|
<div role="button" tabindex="0" class="ant-page-header-back-button">
|
||||||
@if (BackIcon.IsT0)
|
@if (BackIconTemplate != null)
|
||||||
{
|
{
|
||||||
<Icon Type="arrow-left" Theme="outline" />
|
@BackIconTemplate
|
||||||
}
|
}
|
||||||
else if (BackIcon.IsT1)
|
else if (BackIcon.IsT1)
|
||||||
{
|
{
|
||||||
@ -22,7 +22,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@BackIcon.AsT2
|
<Icon Type="arrow-left" Theme="outline" />
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -32,18 +32,11 @@
|
|||||||
@PageHeaderAvatar
|
@PageHeaderAvatar
|
||||||
|
|
||||||
<!--title-->
|
<!--title-->
|
||||||
@if (Title.Value != null)
|
@if (TitleTemplate != null || Title != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
<span class="ant-page-header-heading-title">
|
<span class="ant-page-header-heading-title">
|
||||||
@if (Title.IsT0)
|
@if (TitleTemplate != null)@TitleTemplate else @Title
|
||||||
{
|
|
||||||
@Title.AsT0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@Title.AsT1
|
|
||||||
}
|
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -57,18 +50,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
<!--subtitle-->
|
<!--subtitle-->
|
||||||
@if (Subtitle.Value != null)
|
@if (SubtitleTemplate != null || Subtitle != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
<span class="ant-page-header-heading-sub-title">
|
<span class="ant-page-header-heading-sub-title">
|
||||||
@if (Subtitle.IsT0)
|
@if (SubtitleTemplate != null)@SubtitleTemplate else @Subtitle
|
||||||
{
|
|
||||||
@Subtitle.AsT0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@Subtitle.AsT1
|
|
||||||
}
|
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -12,13 +12,22 @@ namespace AntDesign
|
|||||||
public bool Ghost { get; set; }
|
public bool Ghost { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<bool?, string, RenderFragment> BackIcon { get; set; }
|
public OneOf<bool?, string> BackIcon { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Title { get; set; }
|
public RenderFragment BackIconTemplate { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Subtitle { get; set; }
|
public string Title { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment TitleTemplate { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string Subtitle { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment SubtitleTemplate { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public EventCallback OnBack { get; set; }
|
public EventCallback OnBack { get; set; }
|
||||||
|
@ -28,20 +28,16 @@
|
|||||||
<div class="ant-popover-inner" role="tooltip">
|
<div class="ant-popover-inner" role="tooltip">
|
||||||
<div class="ant-popover-inner-content">
|
<div class="ant-popover-inner-content">
|
||||||
<div class="ant-popover-message">
|
<div class="ant-popover-message">
|
||||||
@if (Icon == null)
|
@if (IconTemplate != null)
|
||||||
{
|
{
|
||||||
Icon = @<Icon Type="exclamation-circle"/>;
|
@IconTemplate
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<Icon Type="@Icon" />
|
||||||
}
|
}
|
||||||
@Icon
|
|
||||||
<div class="ant-popover-message-title">
|
<div class="ant-popover-message-title">
|
||||||
@if (Title.IsT0 && !string.IsNullOrEmpty(Title.AsT0))
|
@if (TitleTemplate != null)@TitleTemplate else @Title
|
||||||
{
|
|
||||||
@Title.AsT0
|
|
||||||
}
|
|
||||||
else if (Title.IsT1 && (Title.AsT1) != null)
|
|
||||||
{
|
|
||||||
@Title.AsT1
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ant-popover-buttons">
|
<div class="ant-popover-buttons">
|
||||||
|
@ -13,7 +13,10 @@ namespace AntDesign
|
|||||||
public partial class Popconfirm : OverlayTrigger
|
public partial class Popconfirm : OverlayTrigger
|
||||||
{
|
{
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Title { get; set; } = string.Empty;
|
public string Title { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment TitleTemplate { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public string CancelText { get; set; } = "Cancel";
|
public string CancelText { get; set; } = "Cancel";
|
||||||
@ -31,7 +34,10 @@ namespace AntDesign
|
|||||||
public ButtonProps CancelButtonProps { get; set; }
|
public ButtonProps CancelButtonProps { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public RenderFragment Icon { get; set; }
|
public string Icon { get; set; } = "exclamation-circle";
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment IconTemplate { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public EventCallback<MouseEventArgs> OnCancel { get; set; }
|
public EventCallback<MouseEventArgs> OnCancel { get; set; }
|
||||||
|
@ -29,24 +29,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ant-popover-inner" role="tooltip">
|
<div class="ant-popover-inner" role="tooltip">
|
||||||
<div class="ant-popover-title">
|
<div class="ant-popover-title">
|
||||||
@if (Title.IsT0 && !string.IsNullOrEmpty(Title.AsT0))
|
@if (TitleTemplate != null)@TitleTemplate else @Title
|
||||||
{
|
|
||||||
@Title.AsT0
|
|
||||||
}
|
|
||||||
else if (Title.IsT1 && (Title.AsT1) != null)
|
|
||||||
{
|
|
||||||
@Title.AsT1
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="ant-popover-inner-content">
|
<div class="ant-popover-inner-content">
|
||||||
@if (Content.IsT0 && !string.IsNullOrEmpty(Content.AsT0))
|
@if (ContentTemplate != null)@ContentTemplate else @Content
|
||||||
{
|
|
||||||
@Content.AsT0
|
|
||||||
}
|
|
||||||
else if (Content.IsT1 && (Content.AsT1) != null)
|
|
||||||
{
|
|
||||||
@Content.AsT1
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -12,10 +12,16 @@ namespace AntDesign
|
|||||||
public partial class Popover : OverlayTrigger
|
public partial class Popover : OverlayTrigger
|
||||||
{
|
{
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Title { get; set; } = string.Empty;
|
public string Title { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Content { get; set; } = string.Empty;
|
public RenderFragment TitleTemplate { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string Content { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment ContentTemplate { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public bool ArrowPointAtCenter { get; set; } = false;
|
public bool ArrowPointAtCenter { get; set; } = false;
|
||||||
|
@ -2,35 +2,24 @@
|
|||||||
@inherits AntDomComponentBase
|
@inherits AntDomComponentBase
|
||||||
|
|
||||||
<div class="@ClassMapper.Class">
|
<div class="@ClassMapper.Class">
|
||||||
<div class="@IconClassMapper.Class">
|
@if (IsShowIcon)
|
||||||
@if (IsImage)
|
{
|
||||||
{
|
<div class="@IconClassMapper.Class">
|
||||||
@((MarkupString)_svgImage)
|
@if (IsImage)
|
||||||
}
|
{
|
||||||
else
|
@((MarkupString)_svgImage)
|
||||||
{
|
}
|
||||||
@BuildIcon
|
else
|
||||||
}
|
{
|
||||||
</div>
|
@BuildIcon
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
<div class="ant-result-title">
|
<div class="ant-result-title">
|
||||||
@if (Title.IsT0)
|
@if (TitleTemplate != null)@TitleTemplate else @Title
|
||||||
{
|
|
||||||
@Title.AsT0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@Title.AsT1
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="ant-result-subtitle">
|
<div class="ant-result-subtitle">
|
||||||
@if (SubTitle.IsT0)
|
@if (SubTitleTemplate != null)@SubTitleTemplate else @SubTitle
|
||||||
{
|
|
||||||
@SubTitle.AsT0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@SubTitle.AsT1
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
@if (ChildContent != null)
|
@if (ChildContent != null)
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using Microsoft.AspNetCore.Components;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
using OneOf;
|
using OneOf;
|
||||||
|
|
||||||
namespace AntDesign
|
namespace AntDesign
|
||||||
@ -8,10 +8,16 @@ namespace AntDesign
|
|||||||
public partial class Result : AntDomComponentBase
|
public partial class Result : AntDomComponentBase
|
||||||
{
|
{
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Title { get; set; }
|
public string Title { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> SubTitle { get; set; }
|
public RenderFragment TitleTemplate { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string SubTitle { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment SubTitleTemplate { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public RenderFragment Extra { get; set; }
|
public RenderFragment Extra { get; set; }
|
||||||
@ -26,6 +32,12 @@ namespace AntDesign
|
|||||||
[Parameter]
|
[Parameter]
|
||||||
public string Icon { get; set; }
|
public string Icon { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否显示图标,默认显示
|
||||||
|
/// </summary>
|
||||||
|
[Parameter]
|
||||||
|
public bool IsShowIcon { get; set; } = true;
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public RenderFragment ChildContent { get; set; }
|
public RenderFragment ChildContent { get; set; }
|
||||||
|
|
||||||
|
@ -4,22 +4,22 @@
|
|||||||
|
|
||||||
<div class="ant-statistic" style="@Style" @ref="Ref" id="@Id">
|
<div class="ant-statistic" style="@Style" @ref="Ref" id="@Id">
|
||||||
<div class="ant-statistic-title">
|
<div class="ant-statistic-title">
|
||||||
@if (Title.IsT0)@Title.AsT0 else @Title.AsT1
|
@if (TitleTemplate != null)@TitleTemplate else @Title
|
||||||
</div>
|
</div>
|
||||||
<div class="ant-statistic-content" style="@ValueStyle">
|
<div class="ant-statistic-content" style="@ValueStyle">
|
||||||
@if (@Prefix.IsT0 && !string.IsNullOrEmpty(Prefix.AsT0) || @Prefix.IsT1 && Prefix.AsT1 != null)
|
@if (PrefixTemplate != null || Prefix != null)
|
||||||
{
|
{
|
||||||
<span class="ant-statistic-content-prefix">
|
<span class="ant-statistic-content-prefix">
|
||||||
@if (@Prefix.IsT0)@Prefix.AsT0 else @Prefix.AsT1
|
@if (PrefixTemplate != null)@PrefixTemplate else @Prefix
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
<span class="ant-statistic-content-value">
|
<span class="ant-statistic-content-value">
|
||||||
@(Formatter<TimeSpan>.Format(_countDown, Format))
|
@(Formatter<TimeSpan>.Format(_countDown, Format))
|
||||||
</span>
|
</span>
|
||||||
@if (@Suffix.IsT0 && !string.IsNullOrEmpty(@Suffix.AsT0) || @Suffix.IsT1 && @Suffix.AsT1 != null)
|
@if (SuffixTemplate != null || Suffix != null)
|
||||||
{
|
{
|
||||||
<span class="ant-statistic-content-suffix">
|
<span class="ant-statistic-content-suffix">
|
||||||
@if (@Suffix.IsT0)@Suffix.AsT0 else @Suffix.AsT1
|
@if (SuffixTemplate != null)@SuffixTemplate else @Suffix
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
@ -7,17 +7,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
<div class="ant-statistic" style="@Style" @ref="Ref" id="@Id">
|
<div class="ant-statistic" style="@Style" @ref="Ref" id="@Id">
|
||||||
@if (Title.Value != null)
|
<div class="ant-statistic-title">
|
||||||
{
|
@if (TitleTemplate != null)@TitleTemplate else @Title
|
||||||
<div class="ant-statistic-title">
|
</div>
|
||||||
@if (Title.IsT0)@Title.AsT0 else @Title.AsT1
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
<div class="ant-statistic-content" style="@ValueStyle">
|
<div class="ant-statistic-content" style="@ValueStyle">
|
||||||
@if (@Prefix.IsT0 && !string.IsNullOrEmpty(Prefix.AsT0) || @Prefix.IsT1 && Prefix.AsT1 != null)
|
@if (PrefixTemplate != null || Prefix != null)
|
||||||
{
|
{
|
||||||
<span class="ant-statistic-content-prefix">
|
<span class="ant-statistic-content-prefix">
|
||||||
@if (@Prefix.IsT0)@Prefix.AsT0 else @Prefix.AsT1
|
@if (PrefixTemplate != null)@PrefixTemplate else @Prefix
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
<span class="ant-statistic-content-value">
|
<span class="ant-statistic-content-value">
|
||||||
@ -31,10 +28,10 @@
|
|||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
</span>
|
</span>
|
||||||
@if (@Suffix.IsT0 && !string.IsNullOrEmpty(@Suffix.AsT0) || @Suffix.IsT1 && @Suffix.AsT1 != null)
|
@if (SuffixTemplate != null || Suffix != null)
|
||||||
{
|
{
|
||||||
<span class="ant-statistic-content-suffix">
|
<span class="ant-statistic-content-suffix">
|
||||||
@if (@Suffix.IsT0)@Suffix.AsT0 else @Suffix.AsT1
|
@if (SuffixTemplate != null)@SuffixTemplate else @Suffix
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,22 +6,28 @@ using OneOf;
|
|||||||
|
|
||||||
namespace AntDesign
|
namespace AntDesign
|
||||||
{
|
{
|
||||||
public abstract class StatisticComponentBase<T>:AntDomComponentBase
|
public abstract class StatisticComponentBase<T> : AntDomComponentBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设置数值的前缀
|
/// 设置数值的前缀
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Parameter] public OneOf<string, RenderFragment> Prefix { get; set; } = string.Empty;
|
[Parameter] public string Prefix { get; set; }
|
||||||
|
|
||||||
|
[Parameter] public RenderFragment PrefixTemplate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设置数值的后缀
|
/// 设置数值的后缀
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Parameter] public OneOf<string, RenderFragment> Suffix { get; set; } = string.Empty;
|
[Parameter] public string Suffix { get; set; }
|
||||||
|
|
||||||
|
[Parameter] public RenderFragment SuffixTemplate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 数值的标题
|
/// 数值的标题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Parameter] public OneOf<string, RenderFragment> Title { get; set; } = string.Empty;
|
[Parameter] public string Title { get; set; }
|
||||||
|
|
||||||
|
[Parameter] public RenderFragment TitleTemplate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 数值内容
|
/// 数值内容
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
@inherits AntDomComponentBase
|
@inherits AntDomComponentBase
|
||||||
|
|
||||||
|
|
||||||
<div class="@ClassMapper.Class" style="@Style"id="@Id">
|
<div class="@ClassMapper.Class" style="@Style" id="@Id">
|
||||||
<div class="ant-steps-item-container" @onclick="@HandleClick" tabindex="@GetTabIndex()" @attributes="@_containerAttributes">
|
<div class="ant-steps-item-container" @onclick="@HandleClick" tabindex="@GetTabIndex()" @attributes="@_containerAttributes">
|
||||||
@if (!Last)
|
@if (!Last)
|
||||||
{
|
{
|
||||||
@ -14,12 +14,11 @@
|
|||||||
@if (Percent != null && Parent.Current == Index)
|
@if (Percent != null && Parent.Current == Index)
|
||||||
{
|
{
|
||||||
<div class="ant-steps-progress-icon">
|
<div class="ant-steps-progress-icon">
|
||||||
<Progress
|
<Progress Percent="@((double) Percent)"
|
||||||
Percent="@((double) Percent)"
|
Width=@(Size == "small" ? 30 : 38)
|
||||||
Width=@(Size == "small" ? 30 : 38)
|
Type=ProgressType.Circle
|
||||||
Type=ProgressType.Circle
|
StrokeWidth="4"
|
||||||
StrokeWidth="4"
|
Format=@((p) => "") />
|
||||||
Format=@((p) => "")/>
|
|
||||||
<span class="ant-steps-icon">
|
<span class="ant-steps-icon">
|
||||||
|
|
||||||
@if (string.IsNullOrEmpty(Icon))
|
@if (string.IsNullOrEmpty(Icon))
|
||||||
@ -93,39 +92,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ant-steps-item-content">
|
<div class="ant-steps-item-content">
|
||||||
<div class="ant-steps-item-title">
|
<div class="ant-steps-item-title">
|
||||||
@if (Title.IsT0)
|
@if (TitleTemplate != null)@TitleTemplate else @Title
|
||||||
{
|
|
||||||
@Title.AsT0
|
@if (SubtitleTemplate != null || Subtitle != null)
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@Title.AsT1
|
|
||||||
}
|
|
||||||
@if (Subtitle.Value != null)
|
|
||||||
{
|
{
|
||||||
<div class="ant-steps-item-subtitle">
|
<div class="ant-steps-item-subtitle">
|
||||||
@if (Subtitle.IsT0)
|
@if (SubtitleTemplate != null)@SubtitleTemplate else @Subtitle
|
||||||
{
|
|
||||||
@Subtitle.AsT0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@Subtitle.AsT1
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@if (Description.Value != null)
|
@if (DescriptionTemplate != null || Description != null)
|
||||||
{
|
{
|
||||||
<div class="ant-steps-item-description">
|
<div class="ant-steps-item-description">
|
||||||
@if (Description.IsT0)
|
@if (DescriptionTemplate != null)@DescriptionTemplate else @Description
|
||||||
{
|
|
||||||
@Description.AsT0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@Description.AsT1
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
@ -62,11 +62,17 @@ namespace AntDesign
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Parameter] public OneOf<string, RenderFragment> Title { get; set; }
|
[Parameter] public string Title { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Parameter] public OneOf<string, RenderFragment> Subtitle { get; set; }
|
[Parameter] public RenderFragment TitleTemplate { get; set; }
|
||||||
|
|
||||||
[Parameter] public OneOf<string, RenderFragment> Description { get; set; }
|
[Parameter] public string Subtitle { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[Parameter] public RenderFragment SubtitleTemplate { get; set; }
|
||||||
|
|
||||||
|
[Parameter] public string Description { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[Parameter] public RenderFragment DescriptionTemplate { get; set; }
|
||||||
|
|
||||||
[Parameter] public EventCallback<MouseEventArgs> OnClick { get; set; }
|
[Parameter] public EventCallback<MouseEventArgs> OnClick { get; set; }
|
||||||
|
|
||||||
|
@ -19,25 +19,11 @@
|
|||||||
<span class="@($"{_prefixCls}-inner")">
|
<span class="@($"{_prefixCls}-inner")">
|
||||||
@if (CurrentValue)
|
@if (CurrentValue)
|
||||||
{
|
{
|
||||||
if (CheckedChildren.IsT0)
|
if (CheckedChildrenTemplate != null)@CheckedChildrenTemplate else @CheckedChildren
|
||||||
{
|
|
||||||
@(CheckedChildren.AsT0)
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@(CheckedChildren.AsT1)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (UnCheckedChildren.IsT0)
|
if (UnCheckedChildrenTemplate != null)@UnCheckedChildrenTemplate else @UnCheckedChildren
|
||||||
{
|
|
||||||
@(UnCheckedChildren.AsT0)
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@(UnCheckedChildren.AsT1)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
@ -25,10 +25,16 @@ namespace AntDesign
|
|||||||
public EventCallback<bool> OnChange { get; set; }
|
public EventCallback<bool> OnChange { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> CheckedChildren { get; set; }
|
public string CheckedChildren { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> UnCheckedChildren { get; set; }
|
public RenderFragment CheckedChildrenTemplate { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string UnCheckedChildren { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment UnCheckedChildrenTemplate { get; set; }
|
||||||
|
|
||||||
private bool _clickAnimating = false;
|
private bool _clickAnimating = false;
|
||||||
|
|
||||||
|
@ -17,17 +17,10 @@
|
|||||||
}
|
}
|
||||||
<CascadingValue Value="@this" TValue="ITable">
|
<CascadingValue Value="@this" TValue="ITable">
|
||||||
<div class="@ClassMapper.Class">
|
<div class="@ClassMapper.Class">
|
||||||
@if (@Title.IsT0 && !string.IsNullOrEmpty(Title.AsT0) || @Title.IsT1 && Title.AsT1 != null)
|
@if (TitleTemplate != null || Title != null)
|
||||||
{
|
{
|
||||||
<div class="ant-table-title">
|
<div class="ant-table-title">
|
||||||
@if (Title.IsT0)
|
@if (TitleTemplate != null)@TitleTemplate else @Title
|
||||||
{
|
|
||||||
@Title.AsT0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@Title.AsT1
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
<div class="ant-table-container">
|
<div class="ant-table-container">
|
||||||
@ -67,17 +60,10 @@
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@if (@Footer.IsT0 && !string.IsNullOrEmpty(Footer.AsT0) || @Footer.IsT1 && Footer.AsT1 != null)
|
@if (FooterTemplate != null || Footer != null)
|
||||||
{
|
{
|
||||||
<div class="ant-table-footer">
|
<div class="ant-table-footer">
|
||||||
@if (Footer.IsT0)
|
@if (FooterTemplate != null)@FooterTemplate else @Footer
|
||||||
{
|
|
||||||
@Footer.AsT0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@Footer.AsT1
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@ -152,7 +138,7 @@ RenderFragment<Table<TItem>> body = table =>
|
|||||||
var cacheKey = data.GetHashCode();
|
var cacheKey = data.GetHashCode();
|
||||||
if (!table._dataSourceCache.ContainsKey(cacheKey))
|
if (!table._dataSourceCache.ContainsKey(cacheKey))
|
||||||
{
|
{
|
||||||
table._dataSourceCache[cacheKey] = new RowData<TItem>(rowIndex,table.PageIndex, data);
|
table._dataSourceCache[cacheKey] = new RowData<TItem>(rowIndex, table.PageIndex, data);
|
||||||
}
|
}
|
||||||
var selected = table._dataSourceCache[cacheKey].Selected;
|
var selected = table._dataSourceCache[cacheKey].Selected;
|
||||||
<CascadingValue Value="@rowIndex" Name="RowIndex">
|
<CascadingValue Value="@rowIndex" Name="RowIndex">
|
||||||
|
@ -34,10 +34,16 @@ namespace AntDesign
|
|||||||
public bool Loading { get; set; }
|
public bool Loading { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Title { get; set; }
|
public string Title { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Footer { get; set; }
|
public RenderFragment TitleTemplate { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string Footer { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment FooterTemplate { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public TableSize Size { get; set; }
|
public TableSize Size { get; set; }
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
@inherits AntDomComponentBase
|
@inherits AntDomComponentBase
|
||||||
|
|
||||||
<div class="@this.ClassMapper.Class">
|
<div class="@this.ClassMapper.Class">
|
||||||
<div class="ant-transfer-list @(Footer.Value!=null?FooterClass:"")" @onscroll="@(e=>HandleScroll(TransferDirection.Left,e))" style="@Style">
|
<div class="ant-transfer-list @((FooterTemplate != null || Footer != null)?FooterClass:"")" @onscroll="@(e=>HandleScroll(TransferDirection.Left,e))" style="@Style">
|
||||||
<div class="ant-transfer-list-header">
|
<div class="ant-transfer-list-header">
|
||||||
@if (ShowSelectAll)
|
@if (ShowSelectAll)
|
||||||
{
|
{
|
||||||
@ -66,21 +66,14 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="ant-transfer-list-footer">
|
<div class="ant-transfer-list-footer">
|
||||||
@if (Footer.IsT0)
|
@if (FooterTemplate != null)@FooterTemplate else @Footer
|
||||||
{
|
|
||||||
@Footer.AsT0
|
|
||||||
}
|
|
||||||
else if (Footer.IsT1)
|
|
||||||
{
|
|
||||||
@Footer.AsT1
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ant-transfer-operation">
|
<div class="ant-transfer-operation">
|
||||||
<Button Disabled="@(_leftButtonDisabled||Disabled)" Size="@AntSizeLDSType.Small" Icon="left" Type="@ButtonType.Primary" OnClick="@(e=>MoveItem(e,TransferDirection.Left))">@Operations[0]</Button>
|
<Button Disabled="@(_leftButtonDisabled||Disabled)" Size="@AntSizeLDSType.Small" Icon="left" Type="@ButtonType.Primary" OnClick="@(e=>MoveItem(e,TransferDirection.Left))">@Operations[0]</Button>
|
||||||
<Button Disabled="@(_rightButtonDisabled||Disabled)" Size="@AntSizeLDSType.Small" Icon="right" Type="@ButtonType.Primary" OnClick="@(e=>MoveItem(e,TransferDirection.Right))">@Operations[1]</Button>
|
<Button Disabled="@(_rightButtonDisabled||Disabled)" Size="@AntSizeLDSType.Small" Icon="right" Type="@ButtonType.Primary" OnClick="@(e=>MoveItem(e,TransferDirection.Right))">@Operations[1]</Button>
|
||||||
</div>
|
</div>
|
||||||
<div class="ant-transfer-list @(Footer.Value!=null?FooterClass:"")" @onscroll="@(e => HandleScroll(TransferDirection.Right, e))" style="@Style">
|
<div class="ant-transfer-list @((FooterTemplate != null || Footer != null)?FooterClass:"")" @onscroll="@(e => HandleScroll(TransferDirection.Right, e))" style="@Style">
|
||||||
<div class="ant-transfer-list-header">
|
<div class="ant-transfer-list-header">
|
||||||
@if (ShowSelectAll)
|
@if (ShowSelectAll)
|
||||||
{
|
{
|
||||||
@ -142,14 +135,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="ant-transfer-list-footer">
|
<div class="ant-transfer-list-footer">
|
||||||
@if (Footer.IsT0)
|
@if (FooterTemplate != null)@FooterTemplate else @Footer
|
||||||
{
|
|
||||||
@Footer.AsT0
|
|
||||||
}
|
|
||||||
else if (Footer.IsT1)
|
|
||||||
{
|
|
||||||
@Footer.AsT1
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
@ -1,11 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using Microsoft.AspNetCore.Components;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using OneOf;
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.AspNetCore.Components.Web;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
using Microsoft.AspNetCore.Components.Web;
|
||||||
|
using OneOf;
|
||||||
|
|
||||||
namespace AntDesign
|
namespace AntDesign
|
||||||
{
|
{
|
||||||
@ -55,7 +55,10 @@ namespace AntDesign
|
|||||||
public Func<TransferItem, OneOf<string, RenderFragment>> Render { get; set; }
|
public Func<TransferItem, OneOf<string, RenderFragment>> Render { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public OneOf<string, RenderFragment> Footer { get; set; }
|
public string Footer { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment FooterTemplate { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public RenderFragment ChildContent { get; set; }
|
public RenderFragment ChildContent { get; set; }
|
||||||
|
@ -5,11 +5,14 @@
|
|||||||
<Badge Count="0" ShowZero>
|
<Badge Count="0" ShowZero>
|
||||||
<a href="#" class="head-example" />
|
<a href="#" class="head-example" />
|
||||||
</Badge>
|
</Badge>
|
||||||
@{
|
|
||||||
RenderFragment count = @<Icon Type="clock-circle" Fill="#f5222d"/>;
|
<Badge>
|
||||||
}
|
<CountTemplate>
|
||||||
<Badge Count="@(count)">
|
<Icon Type="clock-circle" Fill="#f5222d" />
|
||||||
<a href="#" class="head-example" />
|
</CountTemplate>
|
||||||
|
<ChildContent>
|
||||||
|
<a href="#" class="head-example" />
|
||||||
|
</ChildContent>
|
||||||
</Badge>
|
</Badge>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
<BadgeRibbon Text=@("Pushes open the window")>
|
<BadgeRibbon Text="Pushes open the window">
|
||||||
<Card Bordered>And raises the spyglass.</Card>
|
<Card Bordered>And raises the spyglass.</Card>
|
||||||
|
</BadgeRibbon>
|
||||||
|
<br />
|
||||||
|
<BadgeRibbon >
|
||||||
|
<TextTemplate>
|
||||||
|
<Icon Type="windows" Theme="outline" />Pushes open the window
|
||||||
|
</TextTemplate>
|
||||||
|
<ChildContent>
|
||||||
|
<Card Bordered>And raises the spyglass.</Card>
|
||||||
|
</ChildContent>
|
||||||
</BadgeRibbon>
|
</BadgeRibbon>
|
@ -1,34 +1,45 @@
|
|||||||
<div>
|
<div>
|
||||||
<Card Bordered Title=@("Default size card")>
|
<Card Bordered Title="Default size card">
|
||||||
<Extra>
|
<Extra>
|
||||||
<a>More</a>
|
<a>More</a>
|
||||||
</Extra>
|
</Extra>
|
||||||
<Body>
|
<Body>
|
||||||
<p>Card content</p>
|
<p>Card content</p>
|
||||||
<p>Card content</p>
|
|
||||||
<p>Card content</p>
|
|
||||||
</Body>
|
</Body>
|
||||||
</Card>
|
</Card>
|
||||||
|
<br />
|
||||||
<Card Bordered Size="small" Title=@("Small size card")>
|
<Card Bordered Size="small" Title="Small size card">
|
||||||
<Extra>
|
<Extra>
|
||||||
<a>More</a>
|
<a>More</a>
|
||||||
</Extra>
|
</Extra>
|
||||||
<Body>
|
<Body>
|
||||||
<p>Card content</p>
|
<p>Card content</p>
|
||||||
<p>Card content</p>
|
</Body>
|
||||||
|
</Card>
|
||||||
|
<br />
|
||||||
|
<Card Bordered>
|
||||||
|
<TitleTemplate>
|
||||||
|
<Icon Type="credit-card" Theme="outline" /> Title is Template
|
||||||
|
</TitleTemplate>
|
||||||
|
<Extra>
|
||||||
|
<a>More</a>
|
||||||
|
</Extra>
|
||||||
|
<Body>
|
||||||
|
<p>Card content</p>
|
||||||
|
</Body>
|
||||||
|
</Card>
|
||||||
|
<br />
|
||||||
|
<Card Bordered Size="small" TitleTemplate="titleTemplate">
|
||||||
|
<Extra>
|
||||||
|
<a>More</a>
|
||||||
|
</Extra>
|
||||||
|
<Body>
|
||||||
<p>Card content</p>
|
<p>Card content</p>
|
||||||
</Body>
|
</Body>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@code
|
|
||||||
{
|
|
||||||
private RenderFragment actionSetting =@<Template> <Icon Type="setting" /></Template>;
|
|
||||||
|
|
||||||
private RenderFragment actionEdit =@<Template><Icon Type="edit" /></Template>;
|
@code{
|
||||||
|
RenderFragment titleTemplate =@<div><Icon Type="credit-card" Theme="outline" /> Title is Template</div>;
|
||||||
private RenderFragment actionEllipsis =@<Template> <Icon Type="ellipsis" /></Template>;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<Collapse DefaultActiveKey="@(new[]{"1"})" Accordion>
|
<Collapse DefaultActiveKey="@(new[]{"1"})" Accordion>
|
||||||
<Panel Header=@("This is panel header 1") Key="1">
|
<Panel Header="This is panel header 1" Key="1">
|
||||||
<p>@text</p>
|
<p>@text</p>
|
||||||
</Panel>
|
</Panel>
|
||||||
<Panel Header=@("This is panel header 2") Key="2">
|
<Panel Header="This is panel header 2" Key="2">
|
||||||
<p>@text</p>
|
<p>@text</p>
|
||||||
</Panel>
|
</Panel>
|
||||||
<Panel Header=@("This is panel header 3") Key="3">
|
<Panel Header="This is panel header 3" Key="3">
|
||||||
<p>@text</p>
|
<p>@text</p>
|
||||||
</Panel>
|
</Panel>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
<Collapse DefaultActiveKey="@(new[]{"1"})" OnChange="Callback">
|
<Collapse DefaultActiveKey="@(new[]{"1"})" OnChange="Callback">
|
||||||
<Panel Header=@("This is panel header 1") Key="1">
|
<Panel Header="This is panel header 1" Key="1">
|
||||||
<p>@text</p>
|
<p>@text</p>
|
||||||
</Panel>
|
</Panel>
|
||||||
<Panel Header=@("This is panel header 2") Key="2">
|
<Panel Key="2">
|
||||||
<p>@text</p>
|
<HeaderTemplate>
|
||||||
|
This is panel header 2
|
||||||
|
</HeaderTemplate>
|
||||||
|
<ChildContent>
|
||||||
|
<p>@text</p>
|
||||||
|
</ChildContent>
|
||||||
</Panel>
|
</Panel>
|
||||||
<Panel Header=@("This is panel header 3") Key="3" Disabled>
|
<Panel Header="This is panel header 3" Key="3" Disabled>
|
||||||
<p>@text</p>
|
<p>@text</p>
|
||||||
</Panel>
|
</Panel>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<Collapse DefaultActiveKey="@(new[]{"1"})" Bordered="false">
|
<Collapse DefaultActiveKey="@(new[]{"1"})" Bordered="false">
|
||||||
<Panel Header=@("This is panel header 1") Key="1">
|
<Panel Header="This is panel header 1" Key="1">
|
||||||
<p>@text</p>
|
<p>@text</p>
|
||||||
</Panel>
|
</Panel>
|
||||||
<Panel Header=@("This is panel header 2") Key="2">
|
<Panel Header="This is panel header 2" Key="2">
|
||||||
<p>@text</p>
|
<p>@text</p>
|
||||||
</Panel>
|
</Panel>
|
||||||
<Panel Header=@("This is panel header 3") Key="3">
|
<Panel Header="This is panel header 3" Key="3">
|
||||||
<p>@text</p>
|
<p>@text</p>
|
||||||
</Panel>
|
</Panel>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
|
@ -1,20 +1,23 @@
|
|||||||
<Collapse
|
<Collapse Bordered="false"
|
||||||
Bordered="false"
|
DefaultActiveKey="@(new[]{"1"})"
|
||||||
DefaultActiveKey="@(new[]{"1"})"
|
Class="site-collapse-custom-collapse">
|
||||||
ExpandIcon="expandIcon"
|
<ExpandIconTemplate>
|
||||||
Class="site-collapse-custom-collapse">
|
<Icon Type="caret-right" Rotate="@(context ? 90 : 0)"></Icon>
|
||||||
<Panel Header=@("This is panel header 1") Key="1"
|
</ExpandIconTemplate>
|
||||||
Class="site-collapse-custom-panel">
|
<ChildContent>
|
||||||
<p>@text</p>
|
<Panel Header="This is panel header 1" Key="1"
|
||||||
</Panel>
|
Class="site-collapse-custom-panel">
|
||||||
<Panel Header=@("This is panel header 2") Key="2"
|
<p>@text</p>
|
||||||
Class="site-collapse-custom-panel">
|
</Panel>
|
||||||
<p>@text</p>
|
<Panel Header="This is panel header 2" Key="2"
|
||||||
</Panel>
|
Class="site-collapse-custom-panel">
|
||||||
<Panel Header=@("This is panel header 3") Key="3"
|
<p>@text</p>
|
||||||
Class="site-collapse-custom-panel">
|
</Panel>
|
||||||
<p>@text</p>
|
<Panel Header="This is panel header 3" Key="3"
|
||||||
</Panel>
|
Class="site-collapse-custom-panel">
|
||||||
|
<p>@text</p>
|
||||||
|
</Panel>
|
||||||
|
</ChildContent>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
|
|
||||||
@code{
|
@code{
|
||||||
@ -25,8 +28,6 @@ Known for its loyalty and faithfulness,
|
|||||||
it can be found as a welcome guest in many households across the world.
|
it can be found as a welcome guest in many households across the world.
|
||||||
";
|
";
|
||||||
|
|
||||||
RenderFragment<bool> expandIcon = isActive => @<Icon Type="caret-right" Rotate="@(isActive ? 90 : 0)"></Icon>;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
@ -1,17 +1,21 @@
|
|||||||
<div>
|
<div>
|
||||||
<Collapse
|
<Collapse DefaultActiveKey="@(new[] { "1" })"
|
||||||
DefaultActiveKey="@(new[]{"1"})"
|
OnChange="Callback"
|
||||||
OnChange="Callback"
|
ExpandIconPosition="@expandIconPosition"
|
||||||
ExpandIconPosition="@expandIconPosition"
|
ExpandIcon="caret-right">
|
||||||
>
|
<Panel Header="This is panel header 1" Key="1" ExtraTemplate="@extra">
|
||||||
<Panel Header=@("This is panel header 1") Key="1" Extra="@extra">
|
|
||||||
<div>@text</div>
|
<div>@text</div>
|
||||||
</Panel>
|
</Panel>
|
||||||
<Panel Header=@("This is panel header 2") Key="2" Extra="@extra">
|
<Panel Header="This is panel header 2" Key="2" ExtraTemplate="@extra">
|
||||||
<div>@text</div>
|
<div>@text</div>
|
||||||
</Panel>
|
</Panel>
|
||||||
<Panel Header=@("This is panel header 3") Key="3" Extra="@extra">
|
<Panel Header="This is panel header 3" Key="3">
|
||||||
<div>@text</div>
|
<ExtraTemplate>
|
||||||
|
<div @onclick:stopPropagation><Icon Type="snippets" /></div>
|
||||||
|
</ExtraTemplate>
|
||||||
|
<ChildContent>
|
||||||
|
<div>@text</div>
|
||||||
|
</ChildContent>
|
||||||
</Panel>
|
</Panel>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
</div>
|
</div>
|
||||||
@ -25,11 +29,10 @@ it can be found as a welcome guest in many households across the world.
|
|||||||
|
|
||||||
RenderFragment extra =@<div @onclick:stopPropagation><Icon Type="setting"></Icon></div>;
|
RenderFragment extra =@<div @onclick:stopPropagation><Icon Type="setting"></Icon></div>;
|
||||||
|
|
||||||
string expandIconPosition = "left";
|
string expandIconPosition = "left";
|
||||||
|
|
||||||
void Callback(string[] key)
|
void Callback(string[] key)
|
||||||
{
|
{
|
||||||
Console.WriteLine(key);
|
Console.WriteLine(key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<Collapse OnChange="Callback">
|
<Collapse OnChange="Callback">
|
||||||
<Panel Header=@("This is panel header 1") Key="1">
|
<Panel Header="This is panel header 1" Key="1">
|
||||||
<Collapse DefaultActiveKey=@(new[]{"1"})>
|
<Collapse DefaultActiveKey=@(new[]{"1"})>
|
||||||
<Panel Header=@("This is panel nest panel") Key="1">
|
<Panel Header="This is panel nest panel" Key="1">
|
||||||
<p>@text</p>
|
<p>@text</p>
|
||||||
</Panel>
|
</Panel>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
</Panel>
|
</Panel>
|
||||||
<Panel Header=@("This is panel header 2") Key="2">
|
<Panel Header="This is panel header 2" Key="2">
|
||||||
<p>@text</p>
|
<p>@text</p>
|
||||||
</Panel>
|
</Panel>
|
||||||
<Panel Header=@("This is panel header 3") Key="3">
|
<Panel Header="This is panel header 3" Key="3">
|
||||||
<p>@text</p>
|
<p>@text</p>
|
||||||
</Panel>
|
</Panel>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<Collapse DefaultActiveKey="@(new[]{"1"})" OnChange="Callback">
|
<Collapse DefaultActiveKey="@(new[]{"1"})" OnChange="Callback">
|
||||||
<Panel Header=@("This is panel header with arrow icon") Key="1">
|
<Panel Header="This is panel header with arrow icon" Key="1">
|
||||||
<p>@text</p>
|
<p>@text</p>
|
||||||
</Panel>
|
</Panel>
|
||||||
<Panel ShowArrow="false" Header=@("This is panel header with no arrow icon") Key="2">
|
<Panel ShowArrow="false" Header="This is panel header with no arrow icon" Key="2">
|
||||||
<p>@text</p>
|
<p>@text</p>
|
||||||
</Panel>
|
</Panel>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<Comment Actions="@(new []{likeAction,dislikeAction,replyAction})"
|
<Comment Actions="@(new []{likeAction,dislikeAction,replyAction})"
|
||||||
Author="@("Han Solo")"
|
Author="Han Solo"
|
||||||
Avatar="@(@"https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png")"
|
Avatar="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||||
Content="@("We supply a series of design principles, practical patterns and high quality design resources (Sketch and Axure), to help people create their product prototypes beautifully and efficiently.")"
|
Content="We supply a series of design principles, practical patterns and high quality design resources (Sketch and Axure), to help people create their product prototypes beautifully and efficiently."
|
||||||
Datetime="dateTime">
|
Datetime="dateTime">
|
||||||
</Comment>
|
</Comment>
|
||||||
|
|
||||||
|
@ -3,11 +3,15 @@
|
|||||||
{
|
{
|
||||||
<AntList DataSource="datas" TItem="Data" Header="@header">
|
<AntList DataSource="datas" TItem="Data" Header="@header">
|
||||||
<Item Context="item">
|
<Item Context="item">
|
||||||
<Comment Avatar="item.Avatar" Author="item.Author" Datetime="item.Datetime" Content="item.Content"></Comment>
|
<Comment Avatar="@item.Avatar" Author="@item.Author" Datetime="@item.Datetime" Content="@item.Content"></Comment>
|
||||||
</Item>
|
</Item>
|
||||||
</AntList>
|
</AntList>
|
||||||
}
|
}
|
||||||
<Comment Avatar="@(@"https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png")" Content="@(GetEditor(@onSubmit))"></Comment>
|
<Comment Avatar="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png">
|
||||||
|
<ContentTemplate>
|
||||||
|
@GetEditor(@onSubmit)
|
||||||
|
</ContentTemplate>
|
||||||
|
</Comment>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<AntList DataSource="@datas" TItem="Data" Header="header" ClassName="comment-list">
|
<AntList DataSource="@datas" TItem="Data" Header="header" ClassName="comment-list">
|
||||||
<Item Context="item">
|
<Item Context="item">
|
||||||
<Comment Actions="item.Actions" Avatar="item.Avatar" Author="item.Author" Datetime="item.Datetime" Content="item.Content"></Comment>
|
<Comment Actions="@item.Actions" Avatar="@item.Avatar" Author="@item.Author" DatetimeTemplate="@item.Datetime" Content="@item.Content"></Comment>
|
||||||
</Item>
|
</Item>
|
||||||
</AntList>
|
</AntList>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<Comment Author="author" Avatar="avatar" Content="content" Actions="@(new []{replyAction})">
|
<Comment Author="@author" Avatar="@avatar" Content="@content" Actions="@(new []{replyAction})">
|
||||||
<Comment Author="author" Avatar="avatar" Content="content" Actions="@(new []{replyAction})">
|
<Comment Author="@author" Avatar="@avatar" Content="@content" Actions="@(new []{replyAction})">
|
||||||
<Comment Author="author" Avatar="avatar" Content="content" Actions="@(new []{replyAction})"/>
|
<Comment Author="@author" Avatar="@avatar" Content="@content" Actions="@(new []{replyAction})"/>
|
||||||
<Comment Author="author" Avatar="avatar" Content="content" Actions="@(new []{replyAction})"/>
|
<Comment Author="@author" Avatar="@avatar" Content="@content" Actions="@(new []{replyAction})"/>
|
||||||
</Comment>
|
</Comment>
|
||||||
</Comment>
|
</Comment>
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<Descriptions Title="@("User Info")">
|
<Descriptions Title="User Info">
|
||||||
<DescriptionsItem Title="@("UserName")">Zhou Maomao</DescriptionsItem>
|
<DescriptionsItem Title="UserName">Zhou Maomao</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Telephone")">18100000000</DescriptionsItem>
|
<DescriptionsItem Title="Telephone">18100000000</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Live")">Hangzhou, Zhejiang</DescriptionsItem>
|
<DescriptionsItem Title="Live">Hangzhou, Zhejiang</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Remark")">Empty</DescriptionsItem>
|
<DescriptionsItem Title="Remark">Empty</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Address")">
|
<DescriptionsItem Title="Address">
|
||||||
No. 18, Wantang Road, Xihu District, Hangzhou, Zhejiang, China
|
No. 18, Wantang Road, Xihu District, Hangzhou, Zhejiang, China
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
</Descriptions>
|
</Descriptions>
|
@ -1,20 +1,20 @@
|
|||||||
<Descriptions Title="@("User Info")" Bordered>
|
<Descriptions Title="User Info" Bordered>
|
||||||
<DescriptionsItem Title="@("Product")">Cloud Database</DescriptionsItem>
|
<DescriptionsItem Title="Product">Cloud Database</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Billing Mode")">Prepaid</DescriptionsItem>
|
<DescriptionsItem Title="Billing Mode">Prepaid</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Automatic Renewal")">YES</DescriptionsItem>
|
<DescriptionsItem Title="Automatic Renewal">YES</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Order Time")">
|
<DescriptionsItem Title="Order Time">
|
||||||
2018-04-24 18:00:00
|
2018-04-24 18:00:00
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Usage Time")" Span="2">
|
<DescriptionsItem Title="Usage Time" Span="2">
|
||||||
2018-04-24 18:00:00 To 2019-04-24 18:00:00
|
2018-04-24 18:00:00 To 2019-04-24 18:00:00
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Status")" Span="3">
|
<DescriptionsItem Title="Status" Span="3">
|
||||||
<Badge Status="@BadgeStatus.Processing" Text="Running"></Badge>
|
<Badge Status="@BadgeStatus.Processing" Text="Running"></Badge>
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Negotiated Amount")">$80.00</DescriptionsItem>
|
<DescriptionsItem Title="Negotiated Amount">$80.00</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Discount")">$20.00</DescriptionsItem>
|
<DescriptionsItem Title="Discount">$20.00</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Official Receipts")">$60.00</DescriptionsItem>
|
<DescriptionsItem Title="Official Receipts">$60.00</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Config Info")">
|
<DescriptionsItem Title="Config Info">
|
||||||
Data disk type: MongoDB
|
Data disk type: MongoDB
|
||||||
<br />
|
<br />
|
||||||
Database version: 3.4
|
Database version: 3.4
|
||||||
|
@ -5,16 +5,16 @@
|
|||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<Descriptions Title="@("Custom Size")" Bordered Size="@size">
|
<Descriptions Title="Custom Size" Bordered Size="@size">
|
||||||
<DescriptionsItem Title="@("Product")">
|
<DescriptionsItem Title="Product">
|
||||||
Cloud Database
|
Cloud Database
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Billing")">Prepaid</DescriptionsItem>
|
<DescriptionsItem Title="Billing">Prepaid</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("time")">18:00:00</DescriptionsItem>
|
<DescriptionsItem Title="time">18:00:00</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Amount")">$80.00</DescriptionsItem>
|
<DescriptionsItem Title="Amount">$80.00</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Discount")">$20.00</DescriptionsItem>
|
<DescriptionsItem Title="Discount">$20.00</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Official")">$60.00</DescriptionsItem>
|
<DescriptionsItem Title="Official">$60.00</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Config Info")">
|
<DescriptionsItem Title="Config Info">
|
||||||
Data disk type: MongoDB
|
Data disk type: MongoDB
|
||||||
<br />
|
<br />
|
||||||
Database version: 3.4
|
Database version: 3.4
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<Descriptions Title="@("Responsive Descriptions")" Bordered Column="@column">
|
<Descriptions Title="Responsive Descriptions" Bordered Column="@column">
|
||||||
<DescriptionsItem Title="@("Product")">
|
<DescriptionsItem Title="Product">
|
||||||
Cloud Database
|
Cloud Database
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Billing")">Prepaid</DescriptionsItem>
|
<DescriptionsItem Title="Billing">Prepaid</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("time")">18:00:00</DescriptionsItem>
|
<DescriptionsItem Title="time">18:00:00</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Amount")">$80.00</DescriptionsItem>
|
<DescriptionsItem Title="Amount">$80.00</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Discount")">$20.00</DescriptionsItem>
|
<DescriptionsItem Title="Discount">$20.00</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Official")">$60.00</DescriptionsItem>
|
<DescriptionsItem Title="Official">$60.00</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Config Info")">
|
<DescriptionsItem Title="Config Info">
|
||||||
Data disk type: MongoDB
|
Data disk type: MongoDB
|
||||||
<br />
|
<br />
|
||||||
Database version: 3.4
|
Database version: 3.4
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<Descriptions Title="@("User Info")" Layout="@DescriptionsLayout.Vertical">
|
<Descriptions Title="User Info" Layout="@DescriptionsLayout.Vertical">
|
||||||
<DescriptionsItem Title="@("UserName")">Zhou Maomao</DescriptionsItem>
|
<DescriptionsItem Title="UserName">Zhou Maomao</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Telephone")">18100000000</DescriptionsItem>
|
<DescriptionsItem Title="Telephone">18100000000</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Live")">Hangzhou, Zhejiang</DescriptionsItem>
|
<DescriptionsItem Title="Live">Hangzhou, Zhejiang</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Address")" Span="2">
|
<DescriptionsItem Title="Address" Span="2">
|
||||||
No. 18, Wantang Road, Xihu District, Hangzhou, Zhejiang, China
|
No. 18, Wantang Road, Xihu District, Hangzhou, Zhejiang, China
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Remark")">Empty</DescriptionsItem>
|
<DescriptionsItem Title="Remark">Empty</DescriptionsItem>
|
||||||
</Descriptions>
|
</Descriptions>
|
@ -1,20 +1,20 @@
|
|||||||
<Descriptions Title="@("User Info")" Bordered Layout="@DescriptionsLayout.Vertical">
|
<Descriptions Title="User Info" Bordered Layout="@DescriptionsLayout.Vertical">
|
||||||
<DescriptionsItem Title="@("Product")">Cloud Database</DescriptionsItem>
|
<DescriptionsItem Title="Product">Cloud Database</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Billing Mode")">Prepaid</DescriptionsItem>
|
<DescriptionsItem Title="Billing Mode">Prepaid</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Automatic Renewal")">YES</DescriptionsItem>
|
<DescriptionsItem Title="Automatic Renewal">YES</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Order Time")">
|
<DescriptionsItem Title="Order Time">
|
||||||
2018-04-24 18:00:00
|
2018-04-24 18:00:00
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Usage Time")" Span="2">
|
<DescriptionsItem Title="Usage Time" Span="2">
|
||||||
2018-04-24 18:00:00 To 2019-04-24 18:00:00
|
2018-04-24 18:00:00 To 2019-04-24 18:00:00
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Status")" Span="3">
|
<DescriptionsItem Title="Status" Span="3">
|
||||||
<Badge Status="processing" Text="Running"></Badge>
|
<Badge Status="processing" Text="Running"></Badge>
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Negotiated Amount")">$80.00</DescriptionsItem>
|
<DescriptionsItem Title="Negotiated Amount">$80.00</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Discount")">$20.00</DescriptionsItem>
|
<DescriptionsItem Title="Discount">$20.00</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Official Receipts")">$60.00</DescriptionsItem>
|
<DescriptionsItem Title="Official Receipts">$60.00</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Config Info")">
|
<DescriptionsItem Title="Config Info">
|
||||||
Data disk type: MongoDB
|
Data disk type: MongoDB
|
||||||
<br />
|
<br />
|
||||||
Database version: 3.4
|
Database version: 3.4
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
<Empty Image='"https://gw.alipayobjects.com/zos/antfincdn/ZHrcdLPrvN/empty.svg"'
|
<Empty Image="https://gw.alipayobjects.com/zos/antfincdn/ZHrcdLPrvN/empty.svg"
|
||||||
ImageStyle='@("height: 60px")'
|
ImageStyle='@("height: 60px")'
|
||||||
Description="customDescription">
|
>
|
||||||
<Button type="@ButtonType.Primary">Create Now</Button>
|
<DescriptionTemplate>
|
||||||
|
<span>Customize <a>Description</a></span>
|
||||||
|
</DescriptionTemplate>
|
||||||
|
<ChildContent>
|
||||||
|
<Button type="@ButtonType.Primary">Create Now</Button>
|
||||||
|
</ChildContent>
|
||||||
|
|
||||||
</Empty>
|
</Empty>
|
||||||
|
|
||||||
@code {
|
|
||||||
private RenderFragment customDescription =@<span>Customize <a>Description</a></span>;
|
|
||||||
}
|
|
@ -1 +1 @@
|
|||||||
<Empty Description="@false" />
|
<Empty Description="false" />
|
@ -1 +1 @@
|
|||||||
<Empty Image="Empty.PRESENTED_IMAGE_SIMPLE" />
|
<Empty Simple/>
|
@ -7,8 +7,8 @@ title:
|
|||||||
|
|
||||||
## zh-CN
|
## zh-CN
|
||||||
|
|
||||||
可以通过设置 `image` 为 `Empty.PRESENTED_IMAGE_SIMPLE` 选择另一种风格的图片。
|
可以通过设置 `Simple` 属性为 `true`,选择另一种风格的图片,这里实现与 Ant Design 不同。
|
||||||
|
|
||||||
## en-US
|
## en-US
|
||||||
|
|
||||||
You can choose another style of `image` by setting image to `Empty.PRESENTED_IMAGE_SIMPLE`.
|
You can choose another style of `image` by setting `Simple` to `true`, here is different from Ant Design.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<AntList DataSource="@data" TItem="BasicItem" OnItemClick="ItemClick">
|
<AntList DataSource="@data" TItem="BasicItem" OnItemClick="ItemClick">
|
||||||
<Item Context="item">
|
<Item Context="item">
|
||||||
<AntListItemMeta Avatar="avatar" Description="Ant Design, a design language for background applications, is refined by Ant UED Team">
|
<AntListItemMeta Avatar="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" Description="Ant Design, a design language for background applications, is refined by Ant UED Team">
|
||||||
<Title>
|
<Title>
|
||||||
<a href="https://ng.ant.design">@item.Title</a>
|
<a href="https://ng.ant.design">@item.Title</a>
|
||||||
</Title>
|
</Title>
|
||||||
@ -11,15 +11,13 @@
|
|||||||
|
|
||||||
@code{
|
@code{
|
||||||
|
|
||||||
RenderFragment avatar = @<Avatar Src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"></Avatar>;
|
|
||||||
|
|
||||||
public class BasicItem
|
public class BasicItem
|
||||||
{
|
{
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<BasicItem> data = new List<BasicItem>
|
public List<BasicItem> data = new List<BasicItem>
|
||||||
{
|
{
|
||||||
new BasicItem { Title = "Ant Design Title 1"},
|
new BasicItem { Title = "Ant Design Title 1"},
|
||||||
new BasicItem { Title = "Ant Design Title 2"},
|
new BasicItem { Title = "Ant Design Title 2"},
|
||||||
new BasicItem { Title = "Ant Design Title 3"},
|
new BasicItem { Title = "Ant Design Title 3"},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<AntList Grid="gutter" DataSource="@Data">
|
<AntList Grid="gutter" DataSource="@Data">
|
||||||
<Item Context="item">
|
<Item Context="item">
|
||||||
<Card Bordered Title="@(item.Title)">
|
<Card Bordered Title="@item.Title">
|
||||||
<Body>
|
<Body>
|
||||||
Card context
|
Card context
|
||||||
</Body>
|
</Body>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<AntList Class="demo-loadmore-list" DataSource="@Data" ItemLayout="AntDirectionVHType.Horizontal" Loading="@InitLoading" Actions="actions">
|
<AntList Class="demo-loadmore-list" DataSource="@Data" ItemLayout="AntDirectionVHType.Horizontal" Loading="@InitLoading" Actions="actions">
|
||||||
<Item Context="item">
|
<Item Context="item">
|
||||||
<AntListItemMeta Avatar="avatar" Description="Ant Design, a design language for background applications, is refined by Ant UED Team">
|
<AntListItemMeta Avatar="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" Description="Ant Design, a design language for background applications, is refined by Ant UED Team">
|
||||||
<Title>
|
<Title>
|
||||||
<a href="https://ant.design">@item.Name.Last</a>
|
<a href="https://ant.design">@item.Name.Last</a>
|
||||||
</Title>
|
</Title>
|
||||||
@ -35,76 +35,75 @@
|
|||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
|
||||||
RenderFragment avatar =@<Avatar Src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"></Avatar>;
|
|
||||||
|
|
||||||
RenderFragment edit = @<a key="list-loadmore-edit">edit</a>;
|
RenderFragment edit = @<a key="list-loadmore-edit">edit</a>;
|
||||||
|
|
||||||
RenderFragment add = @<a key="list-loadmore-more">more</a>;
|
RenderFragment add = @<a key="list-loadmore-more">more</a>;
|
||||||
|
|
||||||
|
|
||||||
public List<RenderFragment> actions { get { return new List<RenderFragment> { edit, add }; } }
|
public List<RenderFragment> actions { get { return new List<RenderFragment> { edit, add }; } }
|
||||||
|
|
||||||
public int count = 3;
|
public int count = 3;
|
||||||
|
|
||||||
public string FakeDataUrl { get { return $"https://randomuser.me/api/?results={count}&inc=name,gender,email,nat&noinfo"; } }
|
public string FakeDataUrl { get { return $"https://randomuser.me/api/?results={count}&inc=name,gender,email,nat&noinfo"; } }
|
||||||
|
|
||||||
public List<DataModel> Data { get; set; }
|
public List<DataModel> Data { get; set; }
|
||||||
|
|
||||||
public bool InitLoading { get; set; } = true;
|
public bool InitLoading { get; set; } = true;
|
||||||
|
|
||||||
public bool Loading { get; set; } = false;
|
public bool Loading { get; set; } = false;
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
Data = await GetData();
|
Data = await GetData();
|
||||||
InitLoading = false;
|
InitLoading = false;
|
||||||
await base.OnInitializedAsync();
|
await base.OnInitializedAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task OnLoadMore()
|
public async Task OnLoadMore()
|
||||||
{
|
{
|
||||||
Loading = true;
|
Loading = true;
|
||||||
var res = await GetData();
|
var res = await GetData();
|
||||||
Data.AddRange(res);
|
Data.AddRange(res);
|
||||||
Loading = false;
|
Loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<List<DataModel>> GetData()
|
public async Task<List<DataModel>> GetData()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var res = await HttpClient.GetFromJsonAsync<Response>(FakeDataUrl);
|
var res = await HttpClient.GetFromJsonAsync<Response>(FakeDataUrl);
|
||||||
return res.Results;
|
return res.Results;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.WriteLine(ex);
|
Console.WriteLine(ex);
|
||||||
return new List<DataModel>();
|
return new List<DataModel>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Response
|
public class Response
|
||||||
{
|
{
|
||||||
public List<DataModel> Results { get; set; }
|
public List<DataModel> Results { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DataModel
|
public class DataModel
|
||||||
{
|
{
|
||||||
public string Gender { get; set; }
|
public string Gender { get; set; }
|
||||||
|
|
||||||
public Name Name { get; set; }
|
public Name Name { get; set; }
|
||||||
|
|
||||||
public string Email { get; set; }
|
public string Email { get; set; }
|
||||||
|
|
||||||
public string Nat { get; set; }
|
public string Nat { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Name
|
public class Name
|
||||||
{
|
{
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
|
|
||||||
public string First { get; set; }
|
public string First { get; set; }
|
||||||
|
|
||||||
public string Last { get; set; }
|
public string Last { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<AntList Grid="gutter" DataSource="@Data">
|
<AntList Grid="gutter" DataSource="@Data">
|
||||||
<Item Context="item">
|
<Item Context="item">
|
||||||
<Card Bordered Title="@(item.Title)">
|
<Card Bordered Title="@item.Title">
|
||||||
<Body>
|
<Body>
|
||||||
Card context
|
Card context
|
||||||
</Body>
|
</Body>
|
||||||
</Card>
|
</Card>
|
||||||
</Item>
|
</Item>
|
||||||
@ -23,7 +23,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
public List<BasicItem> Data = new List<BasicItem>
|
public List<BasicItem> Data = new List<BasicItem>
|
||||||
{
|
{
|
||||||
new BasicItem { Title = "Title 1"},
|
new BasicItem { Title = "Title 1"},
|
||||||
new BasicItem { Title = "Title 2"},
|
new BasicItem { Title = "Title 2"},
|
||||||
new BasicItem { Title = "Title 3"},
|
new BasicItem { Title = "Title 3"},
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<AntList DataSource="@ListData" ItemLayout="@AntDirectionVHType.Vertical" Extra="@extra">
|
<AntList DataSource="@ListData" ItemLayout="@AntDirectionVHType.Vertical" Extra="@extra">
|
||||||
<Item Context="item">
|
<Item Context="item">
|
||||||
<AntListItemMeta Avatar="@avatar" Description="@item.Description">
|
<AntListItemMeta Avatar="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" Description="@item.Description">
|
||||||
<Title>
|
<Title>
|
||||||
<a href="@item.Href">@item.Title</a>
|
<a href="@item.Href">@item.Title</a>
|
||||||
</Title>
|
</Title>
|
||||||
@ -18,8 +18,6 @@
|
|||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
|
||||||
RenderFragment avatar =@<Avatar Src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"></Avatar>;
|
|
||||||
|
|
||||||
RenderFragment extra = @<img width="272" alt="logo" src="https://gw.alipayobjects.com/zos/rmsportal/mqaQswcyDLcXyDKnZfES.png" />;
|
RenderFragment extra = @<img width="272" alt="logo" src="https://gw.alipayobjects.com/zos/rmsportal/mqaQswcyDLcXyDKnZfES.png" />;
|
||||||
|
|
||||||
public int count = 3;
|
public int count = 3;
|
||||||
|
@ -4,17 +4,17 @@
|
|||||||
Navigation One
|
Navigation One
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem Key="app" Disabled>
|
<MenuItem Key="app" Disabled>
|
||||||
<Icon Type="appstore" Theme="outline" ></Icon>
|
<Icon Type="appstore" Theme="outline"></Icon>
|
||||||
Navigation Two
|
Navigation Two
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<SubMenu Title=sub1Title>
|
<SubMenu TitleTemplate=@sub1Title>
|
||||||
<MenuItemGroup Title=@("Item 1")>
|
<MenuItemGroup Title="Item 1">
|
||||||
<MenuItem Key="setting:1">Option 1</MenuItem>
|
<MenuItem Key="setting:1">Option 1</MenuItem>
|
||||||
<MenuItem Key="setting:2">Option 2</MenuItem>
|
<MenuItem Key="setting:2">Option 2</MenuItem>
|
||||||
</MenuItemGroup>
|
</MenuItemGroup>
|
||||||
<MenuItemGroup Title=@("Item 2")>
|
<MenuItemGroup Title="Item 2">
|
||||||
<MenuItem Key="setting:3">Option 3</MenuItem>
|
<MenuItem Key="setting:3">Option 3</MenuItem>
|
||||||
<MenuItem Key="setting:4">Option 4</MenuItem>
|
<MenuItem Key="setting:4">Option 4</MenuItem>
|
||||||
</MenuItemGroup>
|
</MenuItemGroup>
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
<MenuItem Key="alipay">
|
<MenuItem Key="alipay">
|
||||||
@ -27,8 +27,8 @@
|
|||||||
@code
|
@code
|
||||||
{
|
{
|
||||||
RenderFragment sub1Title =
|
RenderFragment sub1Title =
|
||||||
@<Template>
|
@<Template>
|
||||||
<Icon Type="setting" Theme="outline"></Icon>
|
<Icon Type="setting" Theme="outline"></Icon>
|
||||||
Navigation Three - Submenu
|
Navigation Three - Submenu
|
||||||
</Template>;
|
</Template>;
|
||||||
}
|
}
|
||||||
|
@ -1,26 +1,26 @@
|
|||||||
<Menu Style="width: 256px;"
|
<Menu Style="width: 256px;"
|
||||||
DefaultSelectedKeys=@(new[]{"1"})
|
DefaultSelectedKeys=@(new[] { "1" })
|
||||||
DefaultOpenKeys=@(new[]{"sub1"})
|
DefaultOpenKeys=@(new[] { "sub1" })
|
||||||
Mode=@MenuMode.Inline>
|
Mode=@MenuMode.Inline>
|
||||||
<SubMenu Key="sub1" Title=sub1Title>
|
<SubMenu Key="sub1" TitleTemplate=@sub1Title>
|
||||||
<MenuItemGroup Key="g1" Title=@("Item 1")>
|
<MenuItemGroup Key="g1" Title="Item 1">
|
||||||
<MenuItem Key="1">Option 1</MenuItem>
|
<MenuItem Key="1">Option 1</MenuItem>
|
||||||
<MenuItem Key="2">Option 2</MenuItem>
|
<MenuItem Key="2">Option 2</MenuItem>
|
||||||
</MenuItemGroup>
|
</MenuItemGroup>
|
||||||
<MenuItemGroup Key="g2" Title=@("Iem 2")>
|
<MenuItemGroup Key="g2" Title="Item 2">
|
||||||
<MenuItem Key="3">Option 3</MenuItem>
|
<MenuItem Key="3">Option 3</MenuItem>
|
||||||
<MenuItem Key="4">Option 4</MenuItem>
|
<MenuItem Key="4">Option 4</MenuItem>
|
||||||
</MenuItemGroup>
|
</MenuItemGroup>
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
<SubMenu Key="sub2" Title=sub2Title>
|
<SubMenu Key="sub2" TitleTemplate=@sub2Title>
|
||||||
<MenuItem Key="5">Option 5</MenuItem>
|
<MenuItem Key="5">Option 5</MenuItem>
|
||||||
<MenuItem Key="6">Option 6</MenuItem>
|
<MenuItem Key="6">Option 6</MenuItem>
|
||||||
<SubMenu Key="sub3" Title=@("Submenu")>
|
<SubMenu Key="sub3" Title="Submenu">
|
||||||
<MenuItem Key="7">Option 7</MenuItem>
|
<MenuItem Key="7">Option 7</MenuItem>
|
||||||
<MenuItem Key="8">Option 8</MenuItem>
|
<MenuItem Key="8">Option 8</MenuItem>
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
<SubMenu Key="sub4" Title=sub4Title>
|
<SubMenu Key="sub4" TitleTemplate=@sub4Title>
|
||||||
<MenuItem Key="9">Option 9</MenuItem>
|
<MenuItem Key="9">Option 9</MenuItem>
|
||||||
<MenuItem Key="10">Option 10</MenuItem>
|
<MenuItem Key="10">Option 10</MenuItem>
|
||||||
<MenuItem Key="11">Option 11</MenuItem>
|
<MenuItem Key="11">Option 11</MenuItem>
|
||||||
@ -36,15 +36,15 @@
|
|||||||
<span>Navigation One</span>
|
<span>Navigation One</span>
|
||||||
</span>;
|
</span>;
|
||||||
|
|
||||||
RenderFragment sub2Title =
|
RenderFragment sub2Title =
|
||||||
@<span>
|
@<span>
|
||||||
<Icon Type="appstore" Theme="outline"></Icon>
|
<Icon Type="appstore" Theme="outline"></Icon>
|
||||||
<span>Navigation Two</span>
|
<span>Navigation Two</span>
|
||||||
</span>;
|
</span>;
|
||||||
|
|
||||||
RenderFragment sub4Title =
|
RenderFragment sub4Title =
|
||||||
@<span>
|
@<span>
|
||||||
<Icon Type="setting" Theme="outline"></Icon>
|
<Icon Type="setting" Theme="outline"></Icon>
|
||||||
<span>Navigation Three</span>
|
<span>Navigation Three</span>
|
||||||
</span>;
|
</span>;
|
||||||
}
|
}
|
||||||
|
@ -2,20 +2,18 @@
|
|||||||
<Button Type="primary" OnClick="ToggleCollapsed" Style="margin-bottom: 16px">
|
<Button Type="primary" OnClick="ToggleCollapsed" Style="margin-bottom: 16px">
|
||||||
@if (collapsed)
|
@if (collapsed)
|
||||||
{
|
{
|
||||||
<Icon Type="menu-unfold" Theme="outline"></Icon>
|
<Icon Type="menu-unfold" Theme="outline"></Icon>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Icon Type="menu-fold" Theme="outline"></Icon>
|
<Icon Type="menu-fold" Theme="outline"></Icon>
|
||||||
}
|
}
|
||||||
</Button>
|
</Button>
|
||||||
<Menu
|
<Menu DefaultSelectedKeys=@(new[] { "1" })
|
||||||
DefaultSelectedKeys=@(new[]{"1"})
|
DefaultOpenKeys=@(new[] { "sub1" })
|
||||||
DefaultOpenKeys=@(new[]{"sub1"})
|
Mode=MenuMode.Inline
|
||||||
Mode=MenuMode.Inline
|
Theme=MenuTheme.Dark
|
||||||
Theme=MenuTheme.Dark
|
InlineCollapsed=collapsed>
|
||||||
InlineCollapsed=collapsed
|
|
||||||
>
|
|
||||||
<MenuItem Key="1">
|
<MenuItem Key="1">
|
||||||
<Icon Type="pie-chart" Theme="outline"></Icon>
|
<Icon Type="pie-chart" Theme="outline"></Icon>
|
||||||
<span>Option 1</span>
|
<span>Option 1</span>
|
||||||
@ -28,19 +26,19 @@
|
|||||||
<Icon Type="container" Theme="outline"></Icon>
|
<Icon Type="container" Theme="outline"></Icon>
|
||||||
<span>Option 3</span>
|
<span>Option 3</span>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<SubMenu Key="sub1" Title=sub1Title >
|
<SubMenu Key="sub1" TitleTemplate=@sub1Title>
|
||||||
<MenuItem Key="5">Option 5</MenuItem>
|
<MenuItem Key="5">Option 5</MenuItem>
|
||||||
<MenuItem Key="6">Option 6</MenuItem>
|
<MenuItem Key="6">Option 6</MenuItem>
|
||||||
<MenuItem Key="7">Option 7</MenuItem>
|
<MenuItem Key="7">Option 7</MenuItem>
|
||||||
<MenuItem Key="8">Option 8</MenuItem>
|
<MenuItem Key="8">Option 8</MenuItem>
|
||||||
</SubMenu>
|
|
||||||
<SubMenu Key="sub2" Title=sub2Title>
|
|
||||||
<MenuItem Key="9">Option 9</MenuItem>
|
|
||||||
<MenuItem Key="10">Option 10</MenuItem>
|
|
||||||
<SubMenu Key="sub3" Title=@("Submenu")>
|
|
||||||
<MenuItem Key="11">Option 11</MenuItem>
|
|
||||||
<MenuItem Key="12">Option 12</MenuItem>
|
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
|
<SubMenu Key="sub2" TitleTemplate=@sub2Title>
|
||||||
|
<MenuItem Key="9">Option 9</MenuItem>
|
||||||
|
<MenuItem Key="10">Option 10</MenuItem>
|
||||||
|
<SubMenu Key="sub3" Title="Submenu">
|
||||||
|
<MenuItem Key="11">Option 11</MenuItem>
|
||||||
|
<MenuItem Key="12">Option 12</MenuItem>
|
||||||
|
</SubMenu>
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
</Menu>
|
</Menu>
|
||||||
</div>
|
</div>
|
||||||
@ -49,19 +47,19 @@
|
|||||||
bool collapsed = false;
|
bool collapsed = false;
|
||||||
|
|
||||||
RenderFragment sub1Title =
|
RenderFragment sub1Title =
|
||||||
@<span>
|
@<span>
|
||||||
<Icon Type="mail" Theme="outline"></Icon>
|
<Icon Type="mail" Theme="outline"></Icon>
|
||||||
<span>Navigation One</span>
|
<span>Navigation One</span>
|
||||||
</span>;
|
</span>;
|
||||||
|
|
||||||
RenderFragment sub2Title =
|
RenderFragment sub2Title =
|
||||||
@<span>
|
@<span>
|
||||||
<Icon Type="appstore" Theme="outline"></Icon>
|
<Icon Type="appstore" Theme="outline"></Icon>
|
||||||
<span>Navigation Two</span>
|
<span>Navigation Two</span>
|
||||||
</span>;
|
</span>;
|
||||||
|
|
||||||
void ToggleCollapsed()
|
void ToggleCollapsed()
|
||||||
{
|
{
|
||||||
collapsed = !collapsed;
|
collapsed = !collapsed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
|
|
||||||
<div style="width: 256px;">
|
<div style="width: 256px;">
|
||||||
<Menu Mode="MenuMode.Inline">
|
<Menu Mode="MenuMode.Inline">
|
||||||
<SubMenu Title=@("Sub Menu1")>
|
<SubMenu Title="Sub Menu1">
|
||||||
<MenuItem RouterLink="/en-US/components/menu" RouterMatch="NavLinkMatch.All">English Menu Document</MenuItem>
|
<MenuItem RouterLink="/en-US/components/menu" RouterMatch="NavLinkMatch.All">English Menu Document</MenuItem>
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
<SubMenu Title=@("Sub Menu2")>
|
<SubMenu Title="Sub Menu2">
|
||||||
<MenuItem RouterLink="/zh-CN/components/menu" RouterMatch="NavLinkMatch.All">Chinese Menu Document</MenuItem>
|
<MenuItem RouterLink="/zh-CN/components/menu" RouterMatch="NavLinkMatch.All">Chinese Menu Document</MenuItem>
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
</Menu>
|
</Menu>
|
||||||
|
@ -2,21 +2,21 @@
|
|||||||
OpenKeys=this.openKeys
|
OpenKeys=this.openKeys
|
||||||
OnOpenChange=this.onOpenChange
|
OnOpenChange=this.onOpenChange
|
||||||
Style="width:256px ;">
|
Style="width:256px ;">
|
||||||
<SubMenu Key="sub1" Title=sub1Title>
|
<SubMenu Key="sub1" TitleTemplate=@sub1Title>
|
||||||
<MenuItem Key="1">Option 1</MenuItem>
|
<MenuItem Key="1">Option 1</MenuItem>
|
||||||
<MenuItem Key="2">Option 2</MenuItem>
|
<MenuItem Key="2">Option 2</MenuItem>
|
||||||
<MenuItem Key="3">Option 3</MenuItem>
|
<MenuItem Key="3">Option 3</MenuItem>
|
||||||
<MenuItem Key="4">Option 4</MenuItem>
|
<MenuItem Key="4">Option 4</MenuItem>
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
<SubMenu Key="sub2" Title=sub2Title>
|
<SubMenu Key="sub2" TitleTemplate=@sub2Title>
|
||||||
<MenuItem Key="5">Option 5</MenuItem>
|
<MenuItem Key="5">Option 5</MenuItem>
|
||||||
<MenuItem Key="6">Option 6</MenuItem>
|
<MenuItem Key="6">Option 6</MenuItem>
|
||||||
<SubMenu Key="sub3" Title=@("Submenu")>
|
<SubMenu Key="sub3" Title="Submenu">
|
||||||
<MenuItem Key="7">Option 7</MenuItem>
|
<MenuItem Key="7">Option 7</MenuItem>
|
||||||
<MenuItem Key="8">Option 8</MenuItem>
|
<MenuItem Key="8">Option 8</MenuItem>
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
<SubMenu Key="sub4" Title=sub4Title>
|
<SubMenu Key="sub4" TitleTemplate=@sub4Title>
|
||||||
<MenuItem Key="9">Option 9</MenuItem>
|
<MenuItem Key="9">Option 9</MenuItem>
|
||||||
<MenuItem Key="10">Option 10</MenuItem>
|
<MenuItem Key="10">Option 10</MenuItem>
|
||||||
<MenuItem Key="11">Option 11</MenuItem>
|
<MenuItem Key="11">Option 11</MenuItem>
|
||||||
|
@ -17,15 +17,15 @@
|
|||||||
<Icon Type="calendar" Theme="outline"></Icon>
|
<Icon Type="calendar" Theme="outline"></Icon>
|
||||||
Navigation Two
|
Navigation Two
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<SubMenu Key="sub1" Title=sub1Title>
|
<SubMenu Key="sub1" TitleTemplate=@sub1Title>
|
||||||
<MenuItem Key="3">Option 3</MenuItem>
|
<MenuItem Key="3">Option 3</MenuItem>
|
||||||
<MenuItem Key="4">Option 4</MenuItem>
|
<MenuItem Key="4">Option 4</MenuItem>
|
||||||
<SubMenu Key="sub1-2" Title=@("Submenu")>
|
<SubMenu Key="sub1-2" Title="Submenu">
|
||||||
<MenuItem Key="5">Option 5</MenuItem>
|
<MenuItem Key="5">Option 5</MenuItem>
|
||||||
<MenuItem Key="6">Option 6</MenuItem>
|
<MenuItem Key="6">Option 6</MenuItem>
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
<SubMenu Key="sub2" Title=sub2Title>
|
<SubMenu Key="sub2" TitleTemplate=@sub2Title>
|
||||||
<MenuItem Key="7">Option 7</MenuItem>
|
<MenuItem Key="7">Option 7</MenuItem>
|
||||||
<MenuItem Key="8">Option 8</MenuItem>
|
<MenuItem Key="8">Option 8</MenuItem>
|
||||||
<MenuItem Key="9">Option 9</MenuItem>
|
<MenuItem Key="9">Option 9</MenuItem>
|
||||||
@ -61,4 +61,4 @@
|
|||||||
this.theme = value ? MenuTheme.Dark : MenuTheme.Light;
|
this.theme = value ? MenuTheme.Dark : MenuTheme.Light;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -8,21 +8,21 @@
|
|||||||
DefaultOpenKeys=@(new []{"sub1"})
|
DefaultOpenKeys=@(new []{"sub1"})
|
||||||
SelectedKeys=@(new []{current})
|
SelectedKeys=@(new []{current})
|
||||||
Mode="MenuMode.Inline">
|
Mode="MenuMode.Inline">
|
||||||
<SubMenu Key="sub1" Title=sub1Title>
|
<SubMenu Key="sub1" TitleTemplate=@sub1Title>
|
||||||
<MenuItem Key="1">Option 1</MenuItem>
|
<MenuItem Key="1">Option 1</MenuItem>
|
||||||
<MenuItem Key="2">Option 2</MenuItem>
|
<MenuItem Key="2">Option 2</MenuItem>
|
||||||
<MenuItem Key="3">Option 3</MenuItem>
|
<MenuItem Key="3">Option 3</MenuItem>
|
||||||
<MenuItem Key="4">Option 4</MenuItem>
|
<MenuItem Key="4">Option 4</MenuItem>
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
<SubMenu Key="sub2" Title=sub2Title>
|
<SubMenu Key="sub2" TitleTemplate=@sub2Title>
|
||||||
<MenuItem Key="5">Option 5</MenuItem>
|
<MenuItem Key="5">Option 5</MenuItem>
|
||||||
<MenuItem Key="6">Option 6</MenuItem>
|
<MenuItem Key="6">Option 6</MenuItem>
|
||||||
<SubMenu Key="sub3" Title="@("Submenu")">
|
<SubMenu Key="sub3" Title="Submenu">
|
||||||
<MenuItem Key="7">Option 7</MenuItem>
|
<MenuItem Key="7">Option 7</MenuItem>
|
||||||
<MenuItem Key="8">Option 8</MenuItem>
|
<MenuItem Key="8">Option 8</MenuItem>
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
<SubMenu Key="sub4" Title=sub4Title>
|
<SubMenu Key="sub4" TitleTemplate=@sub4Title>
|
||||||
<MenuItem Key="9">Option 9</MenuItem>
|
<MenuItem Key="9">Option 9</MenuItem>
|
||||||
<MenuItem Key="10">Option 10</MenuItem>
|
<MenuItem Key="10">Option 10</MenuItem>
|
||||||
<MenuItem Key="11">Option 11</MenuItem>
|
<MenuItem Key="11">Option 11</MenuItem>
|
||||||
|
@ -1,52 +1,52 @@
|
|||||||
<Menu OnMenuItemClicked=handleClick Style=" width: 256px" Mode=MenuMode.Vertical>
|
<Menu OnMenuItemClicked=handleClick Style=" width: 256px" Mode=MenuMode.Vertical>
|
||||||
<SubMenu Key="sub1" Title=sub1Title>
|
<SubMenu Key="sub1" TitleTemplate=@sub1Title>
|
||||||
<MenuItemGroup Title=@("Item 1")>
|
<MenuItemGroup Title="Item 1">
|
||||||
<MenuItem Key="1">Option 1</MenuItem>
|
<MenuItem Key="1">Option 1</MenuItem>
|
||||||
<MenuItem Key="2">Option 2</MenuItem>
|
<MenuItem Key="2">Option 2</MenuItem>
|
||||||
</MenuItemGroup>
|
</MenuItemGroup>
|
||||||
<MenuItemGroup Title=@("Item 2")>
|
<MenuItemGroup Title="Item 2">
|
||||||
<MenuItem Key="3">Option 3</MenuItem>
|
<MenuItem Key="3">Option 3</MenuItem>
|
||||||
<MenuItem Key="4">Option 4</MenuItem>
|
<MenuItem Key="4">Option 4</MenuItem>
|
||||||
</MenuItemGroup>
|
</MenuItemGroup>
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
<SubMenu Key="sub2" Title=sub2Title >
|
<SubMenu Key="sub2" TitleTemplate=@sub2Title>
|
||||||
<MenuItem Key="5">Option 5</MenuItem>
|
<MenuItem Key="5">Option 5</MenuItem>
|
||||||
<MenuItem Key="6">Option 6</MenuItem>
|
<MenuItem Key="6">Option 6</MenuItem>
|
||||||
<SubMenu Key="sub3" Title=@("Submenu")>
|
<SubMenu Key="sub3" Title="Submenu">
|
||||||
<MenuItem Key="7">Option 7</MenuItem>
|
<MenuItem Key="7">Option 7</MenuItem>
|
||||||
<MenuItem Key="8">Option 8</MenuItem>
|
<MenuItem Key="8">Option 8</MenuItem>
|
||||||
|
</SubMenu>
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
</SubMenu>
|
<SubMenu Key="sub4" TitleTemplate=@sub4Title>
|
||||||
<SubMenu Key="sub4" Title=sub4Title >
|
<MenuItem Key="9">Option 9</MenuItem>
|
||||||
<MenuItem Key="9">Option 9</MenuItem>
|
<MenuItem Key="10">Option 10</MenuItem>
|
||||||
<MenuItem Key="10">Option 10</MenuItem>
|
<MenuItem Key="11">Option 11</MenuItem>
|
||||||
<MenuItem Key="11">Option 11</MenuItem>
|
<MenuItem Key="12">Option 12</MenuItem>
|
||||||
<MenuItem Key="12">Option 12</MenuItem>
|
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
</Menu>
|
</Menu>
|
||||||
@code {
|
@code {
|
||||||
|
|
||||||
RenderFragment sub1Title =
|
RenderFragment sub1Title =
|
||||||
@<span>
|
@<span>
|
||||||
<Icon Type="mail" Theme="outline"></Icon>
|
<Icon Type="mail" Theme="outline"></Icon>
|
||||||
<span>Navigation One</span>
|
<span>Navigation One</span>
|
||||||
</span>;
|
</span>;
|
||||||
|
|
||||||
RenderFragment sub2Title =
|
RenderFragment sub2Title =
|
||||||
@<span>
|
@<span>
|
||||||
<Icon Type="appstore" Theme="outline"></Icon>
|
<Icon Type="appstore" Theme="outline"></Icon>
|
||||||
<span>Navigation Two</span>
|
<span>Navigation Two</span>
|
||||||
</span>;
|
</span>;
|
||||||
|
|
||||||
RenderFragment sub4Title =
|
RenderFragment sub4Title =
|
||||||
@<span>
|
@<span>
|
||||||
<Icon Type="setting" Theme="outline"></Icon>
|
<Icon Type="setting" Theme="outline"></Icon>
|
||||||
<span>Navigation Three</span>
|
<span>Navigation Three</span>
|
||||||
</span>;
|
</span>;
|
||||||
|
|
||||||
|
|
||||||
void handleClick()
|
void handleClick()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
@inject MessageService _message
|
@inject MessageService _message
|
||||||
@inject ConfirmService _confirmService
|
@inject ConfirmService _confirmService
|
||||||
|
|
||||||
|
|
||||||
|
<Divider>Buttons</Divider>
|
||||||
|
|
||||||
<Space>
|
<Space>
|
||||||
<SpaceItem>
|
<SpaceItem>
|
||||||
<Button OnClick="@(async ()=> { await ShowConfirm(ConfirmButtons.OK); })">OK</Button>
|
<Button OnClick="@(async ()=> { await ShowConfirm(ConfirmButtons.OK); })">OK</Button>
|
||||||
@ -35,6 +39,39 @@
|
|||||||
|
|
||||||
</Space>
|
</Space>
|
||||||
|
|
||||||
|
<Divider>Icon</Divider>
|
||||||
|
|
||||||
|
<Space>
|
||||||
|
<SpaceItem>
|
||||||
|
<Button OnClick="@(async ()=> await ShowConfirmIcon(ConfirmIcon.Error))">Error</Button>
|
||||||
|
</SpaceItem>
|
||||||
|
</Space>
|
||||||
|
<Space>
|
||||||
|
<SpaceItem>
|
||||||
|
<Button OnClick="@(async ()=> await ShowConfirmIcon(ConfirmIcon.Info))">Info</Button>
|
||||||
|
</SpaceItem>
|
||||||
|
</Space>
|
||||||
|
<Space>
|
||||||
|
<SpaceItem>
|
||||||
|
<Button OnClick="@(async ()=> await ShowConfirmIcon(ConfirmIcon.None))">None</Button>
|
||||||
|
</SpaceItem>
|
||||||
|
</Space>
|
||||||
|
<Space>
|
||||||
|
<SpaceItem>
|
||||||
|
<Button OnClick="@(async ()=> await ShowConfirmIcon(ConfirmIcon.Question))">Question</Button>
|
||||||
|
</SpaceItem>
|
||||||
|
</Space>
|
||||||
|
<Space>
|
||||||
|
<SpaceItem>
|
||||||
|
<Button OnClick="@(async ()=> await ShowConfirmIcon(ConfirmIcon.Success))">Success</Button>
|
||||||
|
</SpaceItem>
|
||||||
|
</Space>
|
||||||
|
<Space>
|
||||||
|
<SpaceItem>
|
||||||
|
<Button OnClick="@(async ()=> await ShowConfirmIcon(ConfirmIcon.Warning))">Warning</Button>
|
||||||
|
</SpaceItem>
|
||||||
|
</Space>
|
||||||
|
|
||||||
@code{
|
@code{
|
||||||
|
|
||||||
private async Task ShowConfirm(ConfirmButtons confirmButtons)
|
private async Task ShowConfirm(ConfirmButtons confirmButtons)
|
||||||
@ -46,6 +83,15 @@
|
|||||||
var _ = _message.Info($"{confirmResult} button is clicked", 2);
|
var _ = _message.Info($"{confirmResult} button is clicked", 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task ShowConfirmIcon(ConfirmIcon confirmIcon)
|
||||||
|
{
|
||||||
|
var content = "You can set different icons";
|
||||||
|
var title = confirmIcon.ToString();
|
||||||
|
var confirmResult = await _confirmService.Show(content, title, ConfirmButtons.OK, confirmIcon);
|
||||||
|
|
||||||
|
var _ = _message.Info($"{confirmResult} button is clicked", 2);
|
||||||
|
}
|
||||||
|
|
||||||
private async Task ShowAbortRetryIgnore()
|
private async Task ShowAbortRetryIgnore()
|
||||||
{
|
{
|
||||||
var content = "Here is from ConfirmService, you can get which button is click from result";
|
var content = "Here is from ConfirmService, you can get which button is click from result";
|
||||||
|
@ -8,11 +8,11 @@
|
|||||||
</PageHeaderExtra>
|
</PageHeaderExtra>
|
||||||
<PageHeaderContent>
|
<PageHeaderContent>
|
||||||
<Descriptions Size="small" Column="3">
|
<Descriptions Size="small" Column="3">
|
||||||
<DescriptionsItem Title="@("Created")" Span="1">Lili Qu</DescriptionsItem>
|
<DescriptionsItem Title="Created" Span="1">Lili Qu</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Association")" Span="1"><a>421421</a></DescriptionsItem>
|
<DescriptionsItem Title="Association" Span="1"><a>421421</a></DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Creation Time")" Span="1">2017-01-10</DescriptionsItem>
|
<DescriptionsItem Title="Creation Time" Span="1">2017-01-10</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Effective Time")" Span="1">2017-10-10</DescriptionsItem>
|
<DescriptionsItem Title="Effective Time" Span="1">2017-10-10</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Remarks")" Span="2">
|
<DescriptionsItem Title="Remarks" Span="2">
|
||||||
Gonghu Road, Xihu District, Hangzhou, Zhejiang, China
|
Gonghu Road, Xihu District, Hangzhou, Zhejiang, China
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
@ -32,9 +32,9 @@
|
|||||||
</PageHeaderExtra>
|
</PageHeaderExtra>
|
||||||
<PageHeaderContent>
|
<PageHeaderContent>
|
||||||
<Row Type="flex">
|
<Row Type="flex">
|
||||||
<Statistic Title="@("Status")" Value=@("Pending")></Statistic>
|
<Statistic Title="Status" Value=@("Pending")></Statistic>
|
||||||
<Statistic Title="@("Price")" Value="568.08" Prefix="@("$")" Style="margin: 0 32px"></Statistic>
|
<Statistic Title="Price" Value="568.08" Prefix="$" Style="margin: 0 32px"></Statistic>
|
||||||
<Statistic Title="@("Balance")" Value="3345.08" Prefix="@("$")"></Statistic>
|
<Statistic Title="Balance" Value="3345.08" Prefix="$"></Statistic>
|
||||||
</Row>
|
</Row>
|
||||||
</PageHeaderContent>
|
</PageHeaderContent>
|
||||||
</PageHeader>
|
</PageHeader>
|
@ -1,12 +1,12 @@
|
|||||||
<PageHeader Class="site-page-header" Title="@_title" Subtitle="@("This is a subtitle")" />
|
<PageHeader Class="site-page-header" Title="@_title" Subtitle="This is a subtitle" />
|
||||||
<br />
|
<br />
|
||||||
<PageHeader Class="site-page-header" Title="@_title" Subtitle="@("Custom `OnBack` callback")" OnBack="@(()=> { Console.WriteLine("OnBack");})" />
|
<PageHeader Class="site-page-header" Title="@_title" Subtitle="Custom `OnBack` callback" OnBack="@(()=> { Console.WriteLine("OnBack");})" />
|
||||||
<br />
|
<br />
|
||||||
<PageHeader Class="site-page-header" Title="@_title" Subtitle="@("Custom Icon")" BackIcon="@("backward")" />
|
<PageHeader Class="site-page-header" Title="@_title" Subtitle="Custom Icon" BackIcon="@("backward")" />
|
||||||
<br />
|
<br />
|
||||||
<PageHeader Class="site-page-header" Title="@_title" Subtitle="@("Custom Icon and `OnBack` callback")" BackIcon="icon" OnBack="@(()=> { Console.WriteLine("OnBack");})" />
|
<PageHeader Class="site-page-header" Title="@_title" Subtitle="Custom Icon and `OnBack` callback" BackIconTemplate="icon" OnBack="@(()=> { Console.WriteLine("OnBack");})" />
|
||||||
@code{
|
@code{
|
||||||
private string _title = "Title";
|
private string _title = "Title";
|
||||||
|
|
||||||
RenderFragment icon =@<Icon Type="backward" />;
|
RenderFragment icon =@<Icon Type="backward" />;
|
||||||
}
|
}
|
||||||
|
@ -9,11 +9,11 @@
|
|||||||
</PageHeaderExtra>
|
</PageHeaderExtra>
|
||||||
<PageHeaderContent>
|
<PageHeaderContent>
|
||||||
<Descriptions Size="small" Column="3">
|
<Descriptions Size="small" Column="3">
|
||||||
<DescriptionsItem Title="@("Created")" Span="1">Lili Qu</DescriptionsItem>
|
<DescriptionsItem Title="Created" Span="1">Lili Qu</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Association")" Span="1"><a>421421</a></DescriptionsItem>
|
<DescriptionsItem Title="Association" Span="1"><a>421421</a></DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Creation Time")" Span="1">2017-01-10</DescriptionsItem>
|
<DescriptionsItem Title="Creation Time" Span="1">2017-01-10</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Effective Time")" Span="1">2017-10-10</DescriptionsItem>
|
<DescriptionsItem Title="Effective Time" Span="1">2017-10-10</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Remarks")" Span="2">
|
<DescriptionsItem Title="Remarks" Span="2">
|
||||||
Gonghu Road, Xihu District, Hangzhou, Zhejiang, China
|
Gonghu Road, Xihu District, Hangzhou, Zhejiang, China
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<PageHeader Class="site-page-header" Title="@_title" Subtitle="@_subtitle">
|
<PageHeader Class="site-page-header" Title="Title" Subtitle="This is a subtitle">
|
||||||
<PageHeaderBreadcrumb>
|
<PageHeaderBreadcrumb>
|
||||||
<Breadcrumb>
|
<Breadcrumb>
|
||||||
<BreadcrumbItem>First-level Menu</BreadcrumbItem>
|
<BreadcrumbItem>First-level Menu</BreadcrumbItem>
|
||||||
@ -8,12 +8,4 @@
|
|||||||
<BreadcrumbItem>Third-level Menu</BreadcrumbItem>
|
<BreadcrumbItem>Third-level Menu</BreadcrumbItem>
|
||||||
</Breadcrumb>
|
</Breadcrumb>
|
||||||
</PageHeaderBreadcrumb>
|
</PageHeaderBreadcrumb>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
@code{
|
|
||||||
|
|
||||||
private string _title = "Title";
|
|
||||||
|
|
||||||
private string _subtitle = "This is a subtitle";
|
|
||||||
|
|
||||||
}
|
|
@ -10,19 +10,19 @@
|
|||||||
<div class="pageheader-content">
|
<div class="pageheader-content">
|
||||||
<div class="pageheader-main">
|
<div class="pageheader-main">
|
||||||
<Descriptions Size="small" Column="2">
|
<Descriptions Size="small" Column="2">
|
||||||
<DescriptionsItem Title="@("Created")" Span="1">Lili Qu</DescriptionsItem>
|
<DescriptionsItem Title="Created" Span="1">Lili Qu</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Association")" Span="1"><a>421421</a></DescriptionsItem>
|
<DescriptionsItem Title="Association" Span="1"><a>421421</a></DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Creation Time")" Span="1">2017-01-10</DescriptionsItem>
|
<DescriptionsItem Title="Creation Time" Span="1">2017-01-10</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Effective Time")" Span="1">2017-10-10</DescriptionsItem>
|
<DescriptionsItem Title="Effective Time" Span="1">2017-10-10</DescriptionsItem>
|
||||||
<DescriptionsItem Title="@("Remarks")" Span="2">
|
<DescriptionsItem Title="Remarks" Span="2">
|
||||||
Gonghu Road, Xihu District, Hangzhou, Zhejiang, China
|
Gonghu Road, Xihu District, Hangzhou, Zhejiang, China
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
</div>
|
</div>
|
||||||
<div class="pageheader-extra">
|
<div class="pageheader-extra">
|
||||||
<div>
|
<div>
|
||||||
<Statistic Title="@("Status")" Value=@("Pending")></Statistic>
|
<Statistic Title="Status" Value="@("Pending")"></Statistic>
|
||||||
<Statistic Title="@("Price")" Value="568.08" Prefix="@("$")" Style="margin: 0 32px"></Statistic>
|
<Statistic Title="Price" Value="568.08" Prefix="$" Style="margin: 0 32px"></Statistic>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
@inject MessageService _message
|
@inject MessageService _message
|
||||||
|
|
||||||
<Popconfirm Title="@("Are you sure delete this task?")"
|
<Popconfirm Title="Are you sure delete this task?"
|
||||||
OnConfirm="Confirm"
|
OnConfirm="Confirm"
|
||||||
OnCancel="Cancel"
|
OnCancel="Cancel"
|
||||||
OkText="Yes"
|
OkText="Yes"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
@inject MessageService _message
|
@inject MessageService _message
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Popconfirm Title="@("Are you sure delete this task?")"
|
<Popconfirm Title="Are you sure delete this task?"
|
||||||
Visible="_visible"
|
Visible="_visible"
|
||||||
OnVisibleChange="OnVisibleChange"
|
OnVisibleChange="OnVisibleChange"
|
||||||
OnConfirm="Confirm"
|
OnConfirm="Confirm"
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
<Popconfirm Title="@("Are you sure£¿")"
|
<Popconfirm Title="Are you sure?"
|
||||||
Icon="_icon">
|
Icon="close-circle">
|
||||||
|
<a>Delete</a>
|
||||||
|
</Popconfirm>
|
||||||
|
<br />
|
||||||
|
<Popconfirm Title="Are you sure?"
|
||||||
|
IconTemplate="@_icon">
|
||||||
<a>Delete</a>
|
<a>Delete</a>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
|
|
||||||
@ -7,4 +12,4 @@
|
|||||||
|
|
||||||
private RenderFragment _icon = @<AntDesign.Icon Type="question-circle" Fill="outline" Style="@("color: 'red'")"/>;
|
private RenderFragment _icon = @<AntDesign.Icon Type="question-circle" Fill="outline" Style="@("color: 'red'")"/>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
<Popconfirm Title="@("Are you sure£¿")" OkText="Yes" CancelText="No">
|
<Popconfirm Title="Are you sure£¿" OkText="Yes" CancelText="No">
|
||||||
<a>Delete</a>
|
<a>Delete</a>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
@ -2,46 +2,46 @@
|
|||||||
|
|
||||||
<div class="demo">
|
<div class="demo">
|
||||||
<div style="margin-left: @($"{ButtonWidth}px"); white-space: nowrap;">
|
<div style="margin-left: @($"{ButtonWidth}px"); white-space: nowrap;">
|
||||||
<Popconfirm Placement="@PlacementType.TopLeft" Title="_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
<Popconfirm Placement="@PlacementType.TopLeft" Title="@_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
||||||
<Button>TL</Button>
|
<Button>TL</Button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
<Popconfirm Placement="@PlacementType.Top" Title="_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
<Popconfirm Placement="@PlacementType.Top" Title="@_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
||||||
<Button>Top</Button>
|
<Button>Top</Button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
<Popconfirm Placement="@PlacementType.TopRight" Title="_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
<Popconfirm Placement="@PlacementType.TopRight" Title="@_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
||||||
<Button>TR</Button>
|
<Button>TR</Button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: @($"{ButtonWidth}px"); float: left;">
|
<div style="width: @($"{ButtonWidth}px"); float: left;">
|
||||||
<Popconfirm Placement="@PlacementType.LeftTop" Title="_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
<Popconfirm Placement="@PlacementType.LeftTop" Title="@_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
||||||
<Button>LT</Button>
|
<Button>LT</Button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
<Popconfirm Placement="@PlacementType.Left" Title="_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
<Popconfirm Placement="@PlacementType.Left" Title="@_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
||||||
<Button>Left</Button>
|
<Button>Left</Button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
<Popconfirm Placement="@PlacementType.LeftBottom" Title="_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
<Popconfirm Placement="@PlacementType.LeftBottom" Title="@_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
||||||
<Button>LB</Button>
|
<Button>LB</Button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: @($"{ButtonWidth}px"); margin-left: @($"{ButtonWidth * 4 + 24}px");">
|
<div style="width: @($"{ButtonWidth}px"); margin-left: @($"{ButtonWidth * 4 + 24}px");">
|
||||||
<Popconfirm Placement="@PlacementType.RightTop" Title="_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
<Popconfirm Placement="@PlacementType.RightTop" Title="@_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
||||||
<Button>RT</Button>
|
<Button>RT</Button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
<Popconfirm Placement="@PlacementType.Right" Title="_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
<Popconfirm Placement="@PlacementType.Right" Title="@_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
||||||
<Button>Right</Button>
|
<Button>Right</Button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
<Popconfirm Placement="@PlacementType.RightBottom" Title="_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
<Popconfirm Placement="@PlacementType.RightBottom" Title="@_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
||||||
<Button>RB</Button>
|
<Button>RB</Button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-left: @($"{ButtonWidth}px"); clear: both; white-space: nowrap;">
|
<div style="margin-left: @($"{ButtonWidth}px"); clear: both; white-space: nowrap;">
|
||||||
<Popconfirm Placement="@PlacementType.BottomLeft" Title="_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
<Popconfirm Placement="@PlacementType.BottomLeft" Title="@_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
||||||
<Button>BL</Button>
|
<Button>BL</Button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
<Popconfirm Placement="@PlacementType.Bottom" Title="_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
<Popconfirm Placement="@PlacementType.Bottom" Title="@_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
||||||
<Button>Bottom</Button>
|
<Button>Bottom</Button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
<Popconfirm Placement="@PlacementType.BottomRight" Title="_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
<Popconfirm Placement="@PlacementType.BottomRight" Title="@_title" OkText="@_okText" CancelText="@_cancelText" OnConfirm="Confirm">
|
||||||
<Button>BR</Button>
|
<Button>BR</Button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<div>
|
<div>
|
||||||
<Popover Placement="PlacementType.TopLeft" Title="_text" Content="_content">
|
<Popover Placement="PlacementType.TopLeft" TitleTemplate="@_text" ContentTemplate="@_content">
|
||||||
<Button>Align edge / 边缘对齐</Button>
|
<Button>Align edge / 边缘对齐</Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
<Popover Placement="PlacementType.TopLeft" Title="_text" Content="_content" ArrowPointAtCenter="true">
|
<Popover Placement="PlacementType.TopLeft" TitleTemplate="@_text" ContentTemplate="@_content" ArrowPointAtCenter="true">
|
||||||
<Button>Arrow points to center / 箭头指向中心</Button>
|
<Button>Arrow points to center / 箭头指向中心</Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<Popover Content="_content" Title="@("Title")">
|
<Popover ContentTemplate="@_content" Title="Title">
|
||||||
<Button type="primary">Hover me</Button>
|
<Button type="primary">Hover me</Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<Popover OnVisibleChange="OnVisibleChange" Visible="_visible" Content="_content" Title="@("Title")" Trigger="@(new AntDesign.TriggerType[] { AntDesign.TriggerType.Click})">
|
<Popover OnVisibleChange="OnVisibleChange" Visible="_visible" ContentTemplate="@_content" Title="Title" Trigger="@(new AntDesign.TriggerType[] { AntDesign.TriggerType.Click})">
|
||||||
<Button type="primary">Click me</Button>
|
<Button type="primary">Click me</Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
|
|
||||||
|
@ -1,18 +1,25 @@
|
|||||||
<Popover Style="{width: 500}" OnVisibleChange="OnHoverVisibleChange" Visible="_hoverVisible" Content="_hoverContent" Title="@("Hover title")" Trigger="@(new AntDesign.TriggerType[] { AntDesign.TriggerType.Hover})">
|
<Popover Style="{width: 500}" OnVisibleChange="OnHoverVisibleChange" Visible="_hoverVisible" Title="Hover title" Trigger="@(new AntDesign.TriggerType[] { AntDesign.TriggerType.Hover})">
|
||||||
<Popover OnVisibleChange="OnClickVisibleChange" Visible="_clickVisible" Content="_clickContent" Title="@("Click title")" Trigger="@(new AntDesign.TriggerType[] { AntDesign.TriggerType.Click})">
|
<ContentTemplate>
|
||||||
<Button>Hover and click / 悬停并单击</Button>
|
<div> This is hover content.</div>
|
||||||
</Popover>
|
</ContentTemplate>
|
||||||
|
<ChildContent>
|
||||||
|
<Popover OnVisibleChange="OnClickVisibleChange" Visible="_clickVisible" Content="_clickContent" Title="Click title" Trigger="@(new AntDesign.TriggerType[] { AntDesign.TriggerType.Click})">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div>
|
||||||
|
<div>This is click content.</div>
|
||||||
|
<a @onclick="_=>Close()">Close</a>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
<ChildContent>
|
||||||
|
<Button>Hover and click / 悬停并单击</Button>
|
||||||
|
</ChildContent>
|
||||||
|
|
||||||
|
</Popover>
|
||||||
|
</ChildContent>
|
||||||
</Popover>
|
</Popover>
|
||||||
|
|
||||||
@code{
|
@code{
|
||||||
|
|
||||||
private RenderFragment _hoverContent =@<div> This is hover content.</div>;
|
|
||||||
private RenderFragment _clickContent =>
|
|
||||||
@<div>
|
|
||||||
<div>This is click content.</div>
|
|
||||||
<a @onclick="_=>Close()">Close</a>
|
|
||||||
</div>;
|
|
||||||
|
|
||||||
private bool _hoverVisible = false;
|
private bool _hoverVisible = false;
|
||||||
private bool _clickVisible = false;
|
private bool _clickVisible = false;
|
||||||
|
|
||||||
|
@ -1,45 +1,45 @@
|
|||||||
<div class="demo">
|
<div class="demo">
|
||||||
<div style="margin-left: @($"{ButtonWidth}px"); white-space: nowrap;">
|
<div style="margin-left: @($"{ButtonWidth}px"); white-space: nowrap;">
|
||||||
<Popover Placement="@PlacementType.TopLeft" Title="_text" Content="_content">
|
<Popover Placement="@PlacementType.TopLeft" TitleTemplate="@_text" ContentTemplate="@_content">
|
||||||
<Button>TL</Button>
|
<Button>TL</Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
<Popover Placement="@PlacementType.Top" Title="_text" Content="_content">
|
<Popover Placement="@PlacementType.Top" TitleTemplate="@_text" ContentTemplate="@_content">
|
||||||
<Button>Top</Button>
|
<Button>Top</Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
<Popover Placement="@PlacementType.TopRight" Title="_text" Content="_content">
|
<Popover Placement="@PlacementType.TopRight" TitleTemplate="@_text" ContentTemplate="@_content">
|
||||||
<Button>TR</Button>
|
<Button>TR</Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: @($"{ButtonWidth}px"); float: left;">
|
<div style="width: @($"{ButtonWidth}px"); float: left;">
|
||||||
<Popover Placement="@PlacementType.LeftTop" Title="_text" Content="_content">
|
<Popover Placement="@PlacementType.LeftTop" TitleTemplate="@_text" ContentTemplate="@_content">
|
||||||
<Button>LT</Button>
|
<Button>LT</Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
<Popover Placement="@PlacementType.Left" Title="_text" Content="_content">
|
<Popover Placement="@PlacementType.Left" TitleTemplate="@_text" ContentTemplate="@_content">
|
||||||
<Button>Left</Button>
|
<Button>Left</Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
<Popover Placement="@PlacementType.LeftBottom" Title="_text" Content="_content">
|
<Popover Placement="@PlacementType.LeftBottom" TitleTemplate="@_text" ContentTemplate="@_content">
|
||||||
<Button>LB</Button>
|
<Button>LB</Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: @($"{ButtonWidth}px"); margin-left: @($"{ButtonWidth * 4 + 24}px");">
|
<div style="width: @($"{ButtonWidth}px"); margin-left: @($"{ButtonWidth * 4 + 24}px");">
|
||||||
<Popover Placement="@PlacementType.RightTop" Title="_text" Content="_content">
|
<Popover Placement="@PlacementType.RightTop" TitleTemplate="@_text" ContentTemplate="@_content">
|
||||||
<Button>RT</Button>
|
<Button>RT</Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
<Popover Placement="@PlacementType.Right" Title="_text" Content="_content">
|
<Popover Placement="@PlacementType.Right" TitleTemplate="@_text" ContentTemplate="@_content">
|
||||||
<Button>Right</Button>
|
<Button>Right</Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
<Popover Placement="@PlacementType.RightBottom" Title="_text" Content="_content">
|
<Popover Placement="@PlacementType.RightBottom" TitleTemplate="@_text" ContentTemplate="@_content">
|
||||||
<Button>RB</Button>
|
<Button>RB</Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-left: @($"{ButtonWidth}px"); clear: both; white-space: nowrap;">
|
<div style="margin-left: @($"{ButtonWidth}px"); clear: both; white-space: nowrap;">
|
||||||
<Popover Placement="@PlacementType.BottomLeft" Title="_text" Content="_content">
|
<Popover Placement="@PlacementType.BottomLeft" TitleTemplate="@_text" ContentTemplate="@_content">
|
||||||
<Button>BL</Button>
|
<Button>BL</Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
<Popover Placement="@PlacementType.Bottom" Title="_text" Content="_content">
|
<Popover Placement="@PlacementType.Bottom" TitleTemplate="@_text" ContentTemplate="@_content">
|
||||||
<Button>Bottom</Button>
|
<Button>Bottom</Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
<Popover Placement="@PlacementType.BottomRight" Title="_text" Content="_content">
|
<Popover Placement="@PlacementType.BottomRight" TitleTemplate="@_text" ContentTemplate="@_content">
|
||||||
<Button>BR</Button>
|
<Button>BR</Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<div>
|
<div>
|
||||||
<Popover Content="_content" Title="@("Title")" Trigger="@(new AntDesign.TriggerType[] { AntDesign.TriggerType.Hover})">
|
<Popover ContentTemplate="@_content" Title="Title" Trigger="@(new AntDesign.TriggerType[] { AntDesign.TriggerType.Hover})">
|
||||||
<AntDesign.Button>Hover me</AntDesign.Button>
|
<AntDesign.Button>Hover me</AntDesign.Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
<Popover Content="_content" Title="@("Title")" Trigger="@(new AntDesign.TriggerType[] { AntDesign.TriggerType.Focus})">
|
<Popover ContentTemplate="@_content" Title="Title" Trigger="@(new AntDesign.TriggerType[] { AntDesign.TriggerType.Focus})">
|
||||||
<AntDesign.Button>Focus me</AntDesign.Button>
|
<AntDesign.Button>Focus me</AntDesign.Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
<Popover Content="_content" Title="@("Title")" Trigger="@(new AntDesign.TriggerType[] { AntDesign.TriggerType.Click})">
|
<Popover ContentTemplate="@_content" Title="Title" Trigger="@(new AntDesign.TriggerType[] { AntDesign.TriggerType.Click})">
|
||||||
<AntDesign.Button>Click me</AntDesign.Button>
|
<AntDesign.Button>Click me</AntDesign.Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
<Result
|
<Result Icon="smile-outline"
|
||||||
Icon="smile-outline"
|
Title="Great, we have done all the operations!"
|
||||||
Title=@("Great, we have done all the operations!")
|
Extra="extra">
|
||||||
Extra="extra">
|
</Result>
|
||||||
|
<Divider></Divider>
|
||||||
|
<Result IsShowIcon="false"
|
||||||
|
Title="Great, we can hide the icon!"
|
||||||
|
Extra="extra">
|
||||||
</Result>
|
</Result>
|
||||||
|
|
||||||
@code
|
@code
|
||||||
{
|
{
|
||||||
RenderFragment extra = @<Button Type="primary">Next</Button>;
|
RenderFragment extra =@<Button Type="primary">Next</Button>;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<Result
|
<Result
|
||||||
Status="error"
|
Status="error"
|
||||||
Title=@("Submission Failed")
|
Title="Submission Failed"
|
||||||
SubTitle=@("Please check and modify the following information before resubmitting.")
|
SubTitle="Please check and modify the following information before resubmitting."
|
||||||
Extra=extra
|
Extra=extra
|
||||||
>
|
>
|
||||||
<div class="desc">
|
<div class="desc">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<Result
|
<Result
|
||||||
Title=@("Your operation has been executed")
|
Title="Your operation has been executed"
|
||||||
Extra=extra
|
Extra=extra
|
||||||
/>
|
/>
|
||||||
@code {
|
@code {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user