Skip to content

Commit

Permalink
Update AntDesign 1.1.0 (#114)
Browse files Browse the repository at this point in the history
* Update AntDesign 1.1.0

* ignore css
  • Loading branch information
ElderJames authored Jan 1, 2025
1 parent 4561eb8 commit 568b607
Show file tree
Hide file tree
Showing 36 changed files with 37 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<SpaceItem>
<Tooltip Title="@("Help")" Placement="@Placement.Bottom">
<span class="action">
<Icon Type="question-circle" Theme="outline" />
<Icon Type="question-circle" Theme="@IconThemeType.Outline" />
</span>
</Tooltip>
</SpaceItem>
Expand Down
4 changes: 2 additions & 2 deletions src/layout/example/AntDesign.ProLayout.Wasm/Pages/Admin.razor
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<Card>
<Alert
Message="umi ui 现已发布,欢迎使用 npm run ui 启动体验。"
Type="success"
Type="@AlertType.Success"
ShowIcon="true"
Banner
Style="margin: -12px; margin-bottom: 48px;"/>
<Title Level="2" Style="text-align: center;">
<Icon Type="smile" Theme="twotone" /> Ant Design Pro <Icon Type="heart" Theme="twotone" TwotoneColor="#eb2f96" /> You
<Icon Type="smile" Theme="@IconThemeType.TwoTone" /> Ant Design Pro <Icon Type="heart" Theme="@IconThemeType.TwoTone" TwotoneColor="#eb2f96" /> You
</Title>
</Card>
<p style="text-align: center; margin-top: 24px;">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Card>
<Alert
Message="umi ui 现已发布,点击右下角 umi 图标即可使用"
Type="success"
Type="AlertType.Success"
ShowIcon="true"
Banner
Style="margin: -12px; margin-bottom: 24px"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
TItem="string"
TItemValue="string"
DefaultValue="@("product")"
Size="small"
Size="@InputSize.Small"
Style="width: 100%;">
<SelectOptions>
<SelectOption TItem="string" TItemValue="string" Value="@("product")" Label="Product" />
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion src/layout/src/AntDesign.ProLayout.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="AntDesign" Version="1.0.1" />
<PackageReference Include="AntDesign" Version="1.1.0" />
</ItemGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' And '$(SolutionDir)'==''">
Expand Down
5 changes: 3 additions & 2 deletions src/layout/src/Core/AntProComponentBase.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Components;
using System.Collections.Generic;
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Options;

namespace AntDesign.ProLayout
Expand All @@ -17,7 +18,7 @@ public MenuTheme NavTheme
_ => MenuTheme.Dark
};
}
set => SettingState.Value.NavTheme = value.Name;
set => SettingState.Value.NavTheme = value.ToString().ToLowerInvariant();
}

[Parameter]
Expand Down
4 changes: 2 additions & 2 deletions src/layout/src/GlobalHeader/GlobalHeader.razor
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ else
@onclick="@(async () => { await OnCollapse.InvokeAsync(!Collapsed);})">
@if (Collapsed)
{
<Icon Type="menu-unfold" Theme="outline" />
<Icon Type="menu-unfold" Theme="@IconThemeType.Outline" />
}
else
{
<Icon Type="menu-fold" Theme="outline" />
<Icon Type="menu-fold" Theme="@IconThemeType.Outline" />
}
</span>
}
Expand Down
2 changes: 1 addition & 1 deletion src/layout/src/HeaderSearch/HeaderSearch.razor
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@inherits AntDomComponentBase

<div class="@ClassMapper.Class" @onclick="@(async args => await SetSearchMode(true))">
<Icon Type="search" Theme="outline" Style="cursor: pointer;" />
<Icon Type="search" Theme="@IconThemeType.Outline" Style="cursor: pointer;" />
<!--todo: auto complete not working-->
@* <AutoComplete Class="@AutoCompleteClassMapper.Class" *@
@* Options="@Options"> *@
Expand Down
2 changes: 1 addition & 1 deletion src/layout/src/NoticeIcon/NoticeIcon.razor
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<Unbound>
<span @ref="@context.Current" class="@ClassMapper.Class">
<Badge Count="Count" Style="box-shadow: none;" Class="badge">
<Icon Type="bell" Theme="outline" />
<Icon Type="bell" Theme="@IconThemeType.Outline" />
</Badge>
</span>
</Unbound>
Expand Down
4 changes: 2 additions & 2 deletions src/layout/src/RightContent/AvatarDropdown.razor
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@

@if (string.IsNullOrEmpty(Avatar))
{
<Avatar Size="small" Icon="user" />
<Avatar Size="@AvatarSize.Small" Icon="user" />
}
else
{
<Avatar Size="small" Class="avatar" Src="@Avatar" Alt="avatar" />
<Avatar Size="@AvatarSize.Small" Class="avatar" Src="@Avatar" Alt="avatar" />
}

<span class="name anticon">@Name</span>
Expand Down
2 changes: 1 addition & 1 deletion src/layout/src/RightContent/AvatarDropdown.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class AvatarMenuItem
{
public string Key { get; set; }
public string IconType { get; set; }
public string IconTheme { get; set; } = "outline";
public IconThemeType IconTheme { get; set; } = IconThemeType.Outline;
public string Option { get; set; }
public bool IsDivider { get; set; }
}
Expand Down
2 changes: 1 addition & 1 deletion src/layout/src/SelectLang/SelectLang.razor
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</Overlay>
<Unbound>
<span class="dropDown" @ref="@context.Current">
<Icon Type="global" Theme="outline" />
<Icon Type="global" Theme="@IconThemeType.Outline" />
</span>
</Unbound>
</Dropdown>
2 changes: 1 addition & 1 deletion src/layout/src/SettingDrawer/BlockCheckbox.razor
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<img src="@item.Url" alt="@item.Key" />
</Tooltip>
<div class="@BaseClassName-selectIcon" style="display: @(Value == item.Key ? "block" : "none");">
<Icon Type="check" Theme="outline" />
<Icon Type="check" Theme="@IconThemeType.Outline" />
</div>
</div>
}
Expand Down
8 changes: 4 additions & 4 deletions src/layout/src/SettingDrawer/LayoutSetting.razor
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
Action = @<Select
TItem="string"
TItemValue="string"
Size="small"
Size="@InputSize.Small"
Style="width: 80px;"
DefaultValue="SettingState.Value.ContentWidth"
@bind-Value="SettingState.Value.ContentWidth">
Expand All @@ -41,17 +41,17 @@
new SettingItem
{
Title="Fixed Header",
Action = @<Switch Size="small" @bind-Value="SettingState.Value.FixedHeader" />
Action = @<Switch Size="@InputSize.Small" @bind-Value="SettingState.Value.FixedHeader" />
},
new SettingItem
{
Title="Works on Side Menu Layout",
Action = @<Switch Size="small" @bind-Value="SettingState.Value.FixSiderbar" />
Action = @<Switch Size="@InputSize.Small" @bind-Value="SettingState.Value.FixSiderbar" />
},
new SettingItem
{
Title="Split Menus",
Action = @<Switch Size="small" @bind-Value="SettingState.Value.SplitMenus" />
Action = @<Switch Size="@InputSize.Small" @bind-Value="SettingState.Value.SplitMenus" />
},
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/layout/src/SettingDrawer/OtherSetting.razor
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
new SettingItem
{
Title = "Weakmode",
Action = @<Switch Size="small" @bind-Value="SettingState.Value.ColorWeak" />
Action = @<Switch Size="@InputSize.Small" @bind-Value="SettingState.Value.ColorWeak" />
},
new SettingItem()
};
Expand Down
8 changes: 4 additions & 4 deletions src/layout/src/SettingDrawer/RegionalSetting.razor
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@
new SettingItem
{
Title = "header",
Action = @<Switch Size="small" @bind-Value="SettingState.Value.HeaderRender" />
Action = @<Switch Size="@InputSize.Small" @bind-Value="SettingState.Value.HeaderRender" />
},
new SettingItem
{
Title = "footer",
Action = @<Switch Size="small" @bind-Value="SettingState.Value.FooterRender" />
Action = @<Switch Size="@InputSize.Small" @bind-Value="SettingState.Value.FooterRender" />
},
new SettingItem
{
Title = "menu",
Action = @<Switch Size="small" @bind-Value="SettingState.Value.MenuRender" />
Action = @<Switch Size="@InputSize.Small" @bind-Value="SettingState.Value.MenuRender" />
},
new SettingItem
{
Title = "menuHeader",
Action = @<Switch Size="small" @bind-Value="SettingState.Value.MenuHeaderRender" />
Action = @<Switch Size="@InputSize.Small" @bind-Value="SettingState.Value.MenuHeaderRender" />
},
};
}
Expand Down
10 changes: 5 additions & 5 deletions src/layout/src/SettingDrawer/SettingDrawer.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
<Drawer
Visible="_show"
Width="@("300")"
Placement="right"
Placement="@DrawerPlacement.Right"
Style="z-index: 999;">
<Handler>
<div class="@BaseClassName-drawer-handle" @onclick="SetShow">
@if (_show)
{
<Icon Type="close" Theme="outline" Style="color: #fff; font-size: 20px;" />
<Icon Type="close" Theme="@IconThemeType.Outline" Style="color: #fff; font-size: 20px;" />
}
else
{
<Icon Type="setting" Theme="outline" Style="color: #fff; font-size: 20px;" />
<Icon Type="setting" Theme="@IconThemeType.Outline" Style="color: #fff; font-size: 20px;" />
}
</div>
</Handler>
Expand Down Expand Up @@ -74,7 +74,7 @@
@if (!HideHintAlert)
{
<Alert
Type="warning"
Type="AlertType.Warning"
Message="Setting panel shows in development environment only, please manually modify"
Icon="_notification"
ShowIcon="true"
Expand All @@ -84,7 +84,7 @@
@if (!HideCopyButton)
{
<Button Block OnClick="CopySetting">
<Icon Type="copy" Theme="outline" /> Copy Setting
<Icon Type="copy" Theme="IconThemeType.Outline" /> Copy Setting
</Button>
}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/layout/src/SettingDrawer/ThemeColor.razor
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div class="theme-color-block" style="background-color: @item.Color" @onclick="@(async x=> await HandleClickAsync(item.Key))">
@if (Value == item.Key)
{
<Icon Type="check" Theme="outline" />
<Icon Type="check" Theme="IconThemeType.Outline" />
}
</div>
}
Expand Down
2 changes: 1 addition & 1 deletion src/layout/src/SiderMenu/BaseMenu.razor
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
return @<span>
@if (!string.IsNullOrEmpty(menuItem.Icon))
{
<Icon IconFont="@menuItem.IconFont" Type="@menuItem.Icon" Theme="outline" />
<Icon IconFont="@menuItem.IconFont" Type="@menuItem.Icon" Theme="IconThemeType.Outline" />
}
<span>@menuItem.Name</span>
</span>
Expand Down
6 changes: 3 additions & 3 deletions src/layout/src/SiderMenu/SiderMenu.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ public SiderTheme SiderTheme
{
get
{
return NavTheme.Name switch
return NavTheme switch
{
"light" => SiderTheme.Light,
"dark" => SiderTheme.Dark,
MenuTheme.Light => SiderTheme.Light,
MenuTheme.Dark => SiderTheme.Dark,
_ => SiderTheme.Light
};
}
Expand Down
1 change: 0 additions & 1 deletion src/layout/src/wwwroot/theme/cyan.css

This file was deleted.

1 change: 0 additions & 1 deletion src/layout/src/wwwroot/theme/dark-cyan.css

This file was deleted.

1 change: 0 additions & 1 deletion src/layout/src/wwwroot/theme/dark-dust.css

This file was deleted.

1 change: 0 additions & 1 deletion src/layout/src/wwwroot/theme/dark-geekblue.css

This file was deleted.

1 change: 0 additions & 1 deletion src/layout/src/wwwroot/theme/dark-green.css

This file was deleted.

1 change: 0 additions & 1 deletion src/layout/src/wwwroot/theme/dark-purple.css

This file was deleted.

1 change: 0 additions & 1 deletion src/layout/src/wwwroot/theme/dark-sunset.css

This file was deleted.

1 change: 0 additions & 1 deletion src/layout/src/wwwroot/theme/dark-volcano.css

This file was deleted.

1 change: 0 additions & 1 deletion src/layout/src/wwwroot/theme/dark.css

This file was deleted.

1 change: 0 additions & 1 deletion src/layout/src/wwwroot/theme/dust.css

This file was deleted.

1 change: 0 additions & 1 deletion src/layout/src/wwwroot/theme/geekblue.css

This file was deleted.

1 change: 0 additions & 1 deletion src/layout/src/wwwroot/theme/green.css

This file was deleted.

1 change: 0 additions & 1 deletion src/layout/src/wwwroot/theme/purple.css

This file was deleted.

1 change: 0 additions & 1 deletion src/layout/src/wwwroot/theme/sunset.css

This file was deleted.

1 change: 0 additions & 1 deletion src/layout/src/wwwroot/theme/volcano.css

This file was deleted.

0 comments on commit 568b607

Please sign in to comment.