mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-02 20:17:58 +08:00
4d2c77fec7
* feat: add mock browser * docs: add mock browser * docs: rename menu * fix: style for submenu * docs: add two menu demo * fix: some errors * fix(module:menu): openkeys * docs: add switch-mode demo for menu * docs(module:menu): finish demos * docs(module: menu): add router demo * docs: add new demos (#111) * feat(module: datepicker): remove ant prefix * feat(module: dropdown): remove ant prefix * feat(module: empty): remove ant prefix * feat(module: timepicker): remove ant prefix * docs(module: datepicker): add new demos * docs(module: dropdown): add new demos * docs(module: empty): add new demos * docs(module: timepicker): add new demos * docs: remove old demo Co-authored-by: 钟迪龙 <mutouzdl@hotmail.com> * refactor(module: dropdown): add overlay (#122) * feat(module: dropdown): support left/right popup * feat(module: submenu): use dropdown to popup * feat: add overlay and trigger class(not complete yet) * feat: add OverlayTrigger.cs * feat: submenu support dropdown * feat(module: overlay): prevent hide when child is showing * fix(module: menu): prefixCls error * feat(module: overlay-trigger): change function to virtual * feat(module: dropdown): remove unuse class * feat(module: sub-menu): set IsOpen to Visible * refactor: change namespace * refactor: use smartEnum * fix: menu json * fix: submenu open state Co-authored-by: 笨木头 <musicvs@163.com> Co-authored-by: 钟迪龙 <mutouzdl@hotmail.com>
49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using OneOf;
|
|
|
|
namespace AntBlazor
|
|
{
|
|
public partial class Empty : AntDomComponentBase
|
|
{
|
|
[Parameter]
|
|
public string PrefixCls { get; set; } = "ant-empty";
|
|
|
|
/// <summary>
|
|
/// "ltr"|"rtl"
|
|
/// </summary>
|
|
[Parameter]
|
|
public string Direction { get; set; } = "ltr";
|
|
|
|
[Parameter]
|
|
public string ImageStyle { get; set; }
|
|
|
|
[Parameter]
|
|
public RenderFragment ChildContent { get; set; }
|
|
|
|
[Parameter]
|
|
public OneOf<string, bool, RenderFragment> Description { get; set; } = "暂无数据";
|
|
|
|
[Parameter]
|
|
public OneOf<string, RenderFragment> Image { get; set; } = Empty.PRESENTED_IMAGE_DEFAULT;
|
|
|
|
protected void SetClass()
|
|
{
|
|
this.ClassMapper.Clear()
|
|
.Add(PrefixCls)
|
|
.If($"{PrefixCls}-normal", () => Image.IsT1 && Image.AsT1 == Empty.PRESENTED_IMAGE_SIMPLE)
|
|
.If($"{PrefixCls}-{Direction}", () => Direction.IsIn("ltr", "rlt"))
|
|
;
|
|
}
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
this.SetClass();
|
|
}
|
|
|
|
protected override void OnParametersSet()
|
|
{
|
|
this.SetClass();
|
|
}
|
|
}
|
|
}
|