ant-design-blazor / blazor-pro-components Goto Github PK
View Code? Open in Web Editor NEWPro Components of Blazor. 🏆 Use Ant Design like a Pro!
License: Apache License 2.0
Pro Components of Blazor. 🏆 Use Ant Design like a Pro!
License: Apache License 2.0
could you please update the parameters in SelectLang component to "CascadingParameter"? Then the language menu items can be customized without changing the layout component.
更新到0.18.2后,刷新无法自行选中.
在0.18.1时候没有问题,在未更改代码前提下升级0.18.2后,
刷新页面,首次加载左菜单后,无法自动将选中的当前菜单赋予高亮颜色.
此时点击其它菜单会有高亮
Could not found "AntDesign.ProTable" project in repo as it is reference in solution("src\table\AntDesign.ProTable.csproj") even table component is missing.
How to create MenuItemClick event ?
< BasicLayout MenuData="MenuData" SiderWidth="300" >
< BasicLayout />
static readonly RenderFragment<MenuDataItem> title= menuItem => @<span>
@if (!string.IsNullOrEmpty(menuItem.Icon))
{
<Icon Type="@menuItem.Icon" Theme="outline" />
}
@if (!string.IsNullOrEmpty(menuItem.IconFont))
{
<IconFont Type="@menuItem.IconFont" />
}
public class MenuDataItem
{
public string[] Authority { get; set; }
public virtual MenuDataItem[] Children { get; set; }
public bool HideChildrenInMenu { get; set; }
public bool HideInMenu { get; set; }
public string Icon { get; set; }
public string IconFont { get; set; } //Add
public string Locale { get; set; }
public virtual string Name { get; set; }
public string Key { get; set; }
public string Path { get; set; }
public string[] ParentKeys { get; set; }
public NavLinkMatch Match { get; set; }
}
}
So I've been doing some changes in my project so I can use AntDesign.Pro. I noticed there is a ton of stuff that leaks from AntDesign.Pro to pro-components. What I mean is for example in AvatarDropdown
the menu options are basically just hardcoded stuff that is needed to show-off AntDesign.Pro. This makes the components in that state useless. Same thing for SelectLang
. What I'd like to do is to make it more flexible. What I want to do is just do a PR that will have a number of changes spanning through a number of different components. But on top of that, the changes would require also a separate PR in AntDesign.Pro. I figured since I do those changes in my project, I could apply them to the source 😉.
I want to do these big PRs because I do not know how long it is going to take it to merge if each change is done as a separate PR. And that will be really hard for me continue working on my stuff & keep multiple PRs... So is that going to be ok with you guys?
我这里后台是多应用模式+共享左边的菜单。
应用切换后,菜单也会随之变化。
<BasicLayout Logo="@("https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg")"
MenuData="leftMenus">
<RightContentRender>
<RightContent @bind-User="@User" MenuData="topMenus" MenuDataChanged="MenuChanged" />
</RightContentRender>
当我topMenus(目前只有一级菜单)点击之后, leftMenus 会进行重新赋值。
左边的菜单内容会对应的刷新, 但是折叠状态依旧保留之间。
建议增加一个菜单折叠接口出来,或者内部判定当MenuData发生变化的时候, 重置菜单伸缩状态。
Please would you expose MenuData property to enable customizing of menu items for the AvatarDropdown component
Hi, I think HideInMenu feature is missing inside SiderMenu/BaseMenu.razor.
Current:
if (menuItem.Children != null && !menuItem.HideChildrenInMenu)
{
<SubMenu TitleTemplate="@title(menuItem)" Key="@menuItem.Key">
@menuItemTemplate((menuItem.Children, true))
</SubMenu>
}
else
{
<MenuItem Key="@menuItem.Key">
<MenuLink href="@menuItem.Path" Match="@menuItem.Match">
@title(menuItem)
</MenuLink>
</MenuItem>
}
To fix it:
if (menuItem.Children != null && !menuItem.HideChildrenInMenu)
{
<SubMenu TitleTemplate="@title(menuItem)" Key="@menuItem.Key">
@menuItemTemplate((menuItem.Children, true))
</SubMenu>
}
else if (!menuItem.HideInMenu)
{
<MenuItem Key="@menuItem.Key">
<MenuLink href="@menuItem.Path" Match="@menuItem.Match">
@title(menuItem)
</MenuLink>
</MenuItem>
}
Please correct me if I'm wrong. Thanks.
How can i set custom href link to Logo component
@ElderJames
file path:_content/AntDesign.ProLayout/css/ant-design-pro-layout-blazor.css
Hi there,
I believe HandleCollapse method should invoke OnCollapse event callback. Otherwise there is no way to detect when side menu is collapsed. Am I missing something?
private void HandleCollapse(bool collapsed)
{
Collapsed = collapsed;
SetStyle();
}
should be
private void HandleCollapse(bool collapsed)
{
Collapsed = collapsed;
SetStyle();
OnCollapse.InvokeAsync(collapsed);
}
/__w/1/s/src/mono/mono/eglib/gpath.c:115
/__w/1/s/src/mono/mono/eglib/gpath.c:115
info: AntDesign.ProLayout.BasicLayout[0]
BasicLayout initialized.
info: AntDesign.ProLayout.BaseMenu[0]
BaseMenu initialized.
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: No element is currently associated with component 11
Error: No element is currently associated with component 11
at ae.updateComponent (https://localhost:44358/_framework/blazor.webassembly.js:1:19821)
at https://localhost:44358/_framework/blazor.webassembly.js:1:56876
at St.Te._internal.renderBatch (https://localhost:44358/_framework/blazor.webassembly.js:1:57248)
at Object.Rt [as invokeJSFromDotNet] (https://localhost:44358/_framework/blazor.webassembly.js:1:59934)
at _mono_wasm_invoke_js_blazor (https://localhost:44358/_framework/dotnet.6.0.16.olpkzvz1qs.js:1:195300)
at wasm://wasm/00971dfe:wasm-function[3308]:0xc6137
at wasm://wasm/00971dfe:wasm-function[167]:0xd602
at wasm://wasm/00971dfe:wasm-function[166]:0xbd73
at wasm://wasm/00971dfe:wasm-function[2815]:0xabef4
at wasm://wasm/00971dfe:wasm-function[1619]:0x6fcb4
Microsoft.JSInterop.JSException: No element is currently associated with component 11
Error: No element is currently associated with component 11
at ae.updateComponent (https://localhost:44358/_framework/blazor.webassembly.js:1:19821)
at https://localhost:44358/_framework/blazor.webassembly.js:1:56876
at St.Te._internal.renderBatch (https://localhost:44358/_framework/blazor.webassembly.js:1:57248)
at Object.Rt [as invokeJSFromDotNet] (https://localhost:44358/_framework/blazor.webassembly.js:1:59934)
at _mono_wasm_invoke_js_blazor (https://localhost:44358/_framework/dotnet.6.0.16.olpkzvz1qs.js:1:195300)
at wasm://wasm/00971dfe:wasm-function[3308]:0xc6137
at wasm://wasm/00971dfe:wasm-function[167]:0xd602
at wasm://wasm/00971dfe:wasm-function[166]:0xbd73
at wasm://wasm/00971dfe:wasm-function[2815]:0xabef4
at wasm://wasm/00971dfe:wasm-function[1619]:0x6fcb4
at Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled[Int32,RenderBatch,Object,Object](String identifier, Int32 arg0, RenderBatch arg1, Object arg2, Int64 targetInstanceId)
at Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeUnmarshalled[Int32,RenderBatch,Object](String identifier, Int32 arg0, RenderBatch arg1)
at Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer.UpdateDisplayAsync(RenderBatch& batch)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
Hi @ElderJames when Layout = "top"
the RightContentRender
is ignored. How can we get this to work?
Could you please add attribute for NavLinkMatch in MenuDataItem? Thanks.
I am so limited to my own technology, I can't provide PR, so I can only help the maintainer.
Not able to compile, npm install fails
npm ERR! network request to https://npm.cxist.com/normalize-path/-/normalize-path-2.1.1.tgz failed, reason: Socket timeout
files no longer exist ?
can someone fix this ?
I am having a problem justifying the RightContent.razor
as a component. First it gave me a lot of trouble when I tried to use AntDesign.Pro
full version. I will in steps describe what I did and what I noticed:
AntDesign.MySite
project using command line dotnet new antdesign --host=server --full
Layouts/BasicLayout.razor
and Components/GlobalHeader/RightContent.razor
. The latter is responsible for rendering of notification center, language picker and quick user actons. That RightContent
component is consumed by BasicLayout
component.RightContent.razor
. Whatever I was doing, no changes was reflected.RightContent
that was used was actually a component of pro-components. So I had to fully qualify the RightContent
in BasicLayout
like this: <AntDesign.MySite.Components.RightContent />
RightContent
does not expose enough api to be useful, so it has to be altered anyway.It absolutely makes sense to keep RightContent.razor
as a part of AntDesign.Pro
template, but I can only see it being as an obstacle at this stage if it is used in ProComponents
.
In my tests I transferred all the code related to RightContent
to AntDesign.Pro.Layout.Wasm
project to folder Components/GlobalHeaders
. Running the example project works as before.
What is the best location ReuseTabs in Pro Basic Layout?
Hi!
How can i hide right drawing panel and right button element for settings layout?
树形控件有个bug,描述如下,好像当前 0.1.10版本依然存在,能否及时更新一版没有这个bug的版本?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.