Coder Social home page Coder Social logo

ant-design-blazor / ant-design-blazor Goto Github PK

View Code? Open in Web Editor NEW
5.5K 145.0 985.0 81.16 MB

🌈A set of enterprise-class UI components based on Ant Design and Blazor WebAssembly.

Home Page: https://antblazor.com/

License: MIT License

HTML 0.76% C# 78.04% JavaScript 3.97% Shell 0.02% TypeScript 3.21% Less 13.91% CSS 0.06% PowerShell 0.02%
blazor ant-design antd dotnet webassembly wasm blazor-webassembly blazor-components ant-design-blazor hacktoberfest

ant-design-blazor's Introduction

Ant Design Blazor

A rich set of enterprise-class UI components based on Ant Design and Blazor.

Build AntDesign AntDesign AntDesign.Templates codecov AntDesign Ding Talk Group Discord Server

English | 简体中文

✨ Features

  • 🌈 Enterprise-class UI designed for web applications.
  • 📦 A set of high-quality Blazor components out of the box.
  • 💕 Supports WebAssembly-based client-side and SignalR-based server-side UI event interaction.
  • 🎨 Supports Progressive Web Applications (PWA).
  • 🛡 Build with C#, a multi-paradigm static language for an efficient development experience.
  • 🌍 Internationalization support for dozens of languages.
  • 🎁 Seamless integration with existing ASP.NET Core MVC and Razor Pages projects.

🌈 Online Examples

WebAssembly static hosting on:

🖥 Environment Support

  • Supports .NET Core 3.1 / .NET 5 / .NET 6 / .Net 7 / .NET 8.
  • Supports WebAssembly static file deployment.
  • Supports 4 major browsers engines, and Internet Explorer 11+ (Blazor Server only)
  • Supports .NET MAUI / WPF / Windows Forms and other Blazor Hybrid workloads.
  • Supports Electron and other Web standards-based environments.

Due to WebAssembly restriction, Blazor WebAssembly doesn't support IE browser, but Blazor Server supports IE 11† with additional polyfills. See official documentation.

From .NET 5, IE 11 is no longer officially supported. See Blazor: Updated browser support. Unofficial support is provided by Blazor.Polyfill community project.

💿 Current Version

🎨 Design Specification

Regularly synchronize with Official Ant Design specifications, you can check the sync logs online.

Therefore, you can use the custom theme styles of Ant Design directly.

Before the 1.0 release, we will only sync antd 4.x styles.

📦 Installation Guide

Prerequirement

Option 1: Create a new project from the dotnet new template AntDesign.Templates

We have provided the dotnet new template to create a Boilerplate project out of the box:

Pro Template

  • Install the template

    $ dotnet new --install AntDesign.Templates
  • Create the Boilerplate project with the template

    $ dotnet new antdesign -o MyAntDesignApp

Options for the template:

Options Description Type Default
-f | --full If specified, generates all pages of Ant Design Pro bool false
-ho | --host Specify the hosting model 'wasm' | 'server' | 'hosted' 'wasm'
--styles Whether use NodeJS and Less to compile your custom themes. css | less css
--no-restore If specified, skips the automatic restore of the project on create bool false

Option 2: Import Ant Design Blazor into an existing project

  • Go to the project folder of the application and install the Nuget package reference

    $ dotnet add package AntDesign
  • Register the services in Program.cs

    builder.Services.AddAntDesign();

    or Startup.cs

    services.AddAntDesign();
  • Add namespace in _Imports.razor

    @using AntDesign
  • To display the pop-up component dynamically, you need to add the <AntContainer /> component in App.razor.

    • For Blazor WebApp, you also need to specify render mode to <Routes /> for interactivity.
    <Routes @rendermode="RenderMode.InteractiveAuto" />            <-- specify the rendermode ✨
    + <AntContainer @rendermode="RenderMode.InteractiveAuto" />    <-- add this component ✨
    • For legacy blazor apps just add a line of code:
    <Router AppAssembly="@typeof(MainLayout).Assembly">
        <Found Context="routeData">
            <RouteView RouteData="routeData" DefaultLayout="@typeof(MainLayout)" />
        </Found>
        <NotFound>
            <LayoutView Layout="@typeof(MainLayout)">
                <Result Status="404" />
            </LayoutView>
        </NotFound>
    </Router>
    
    +  <AntContainer />   <-- add this component ✨
  • Finally, it can be referenced in the .razor component!

    <Button Type="@ButtonType.Primary">Hello World!</Button>

🔨 Development

Gitpod

Click the button below to start a new workspace for development for free.

Open in Gitpod

Local

  • Install .NET Core SDK 8.0.100 or later.

  • Install Node.js (only for building style files and interoperable TypeScript files)

  • Clone to local development

    $ git clone https://github.com/ant-design-blazor/ant-design-blazor.git
    $ cd ant-design-blazor
    $ npm install
    $ dotnet build ./site/AntDesign.Docs.Build/AntDesign.Docs.Build.csproj
    $ npm start
  • Visit https://localhost:5001 in your supported browser and check local development documentation for details.

    Visual Studio 2022 is recommended for development.

🔗 Links

🗺 Roadmap

Check out this issue to learn about our development plans for the 1.0 release.

You can also find the latest news about the features we will implement in the future with antd5.0 style.

🤝 Contributing

PRs Welcome

If you would like to contribute, feel free to create a Pull Request, or give us Bug Report.

💕 Donation

This project is an MIT-licensed open source project. In order to achieve better and sustainable development of the project, we expect to gain more backers. We will use the proceeds for community operations and promotion. You can support us in any of the following ways:

We will put the detailed donation records on the backer list.

❓ Community Support

If you encounter any problems in the process, feel free to ask for help via following channels. We also encourage experienced users to help newcomers.

  • Discord Server

  • 钉钉群

    Scan QR Code with DingTalk

Contributors

This project exists thanks to all the people who contribute.

Code of Conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct.

☀️ License

AntDesign

.NET Foundation

This project is supported by the .NET Foundation.

ant-design-blazor's People

Contributors

1002527441 avatar adsioj avatar agolub-s avatar alexbits avatar anddrzejb avatar anranruye avatar brian-ding avatar bweissronin avatar capchik avatar dashiell-zhang avatar diegofrata avatar elderjames avatar eldiddi avatar epictek avatar hona avatar leafrock avatar lindexi avatar lukblazewicz avatar m-khrapunov avatar magehernan avatar mutouzdl avatar rabbitism avatar rhodon-jargon avatar timchen44 avatar whyilovespringroll avatar wss-kroche avatar xljiulang avatar yongquan-dotnet avatar zhuangkh avatar zxyao145 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ant-design-blazor's Issues

DefaultValue of select works incorrect

<Select  DefaultValue=@(defaultValue) >
    <SelectOption Value="1">Jack</SelectOption>
    <SelectOption Value="2">Lucy</SelectOption>
    <SelectOption Value="3" Disabled>Disabled</SelectOption>
    <SelectOption Value="4">YaoMing</SelectOption>
</Select>

public string defaultValue{ get; set; }
 protected override async Task OnInitializedAsync()  {
   await Task.Delay(3000);
        defaultValue = "4";
}

这种情况下 select的默认选中值就设置不了了

Performance improvements for forms

“Form”中随着组件增加输入延迟明显增加,严重影响使用体验。
With the increase of components in the "Form", the input delay increases significantly, which seriously affects the user experience.

(Documentation) Opening code example and navigating to another component doesn't update code example

Description

When you open the example code section of a component the code displays as expected. However, if you navigate to another component and look at the code sample, you will see the code for the previously viewed component.

Steps to reproduce

This bug only seems to occur in component pages that are part of the same "group". For example, if you first look at a code sample in the Data Entry group, the second component you navigate to must also be part of the Data Entry Group.

Example;

  1. navigate to DatePicker and open the code example.
  2. navigate to Input and you will see the Datepicker code example still open and attached to the Input code example.
  3. Refreshing the page fixes this issue

Documnetation issue with Multi-Language

I know the project only supports Simplified Chinese and English for now. However, if the browser does not use these two languages by default (e.g. Traditional Chinese), it will return unexpected pages, and some components will get 404 errors.

Does the project plan to support more languages or fix this routing error?😍

The rendering issue with ServerPrerendered mode

When prerendering is enabled, JavaScript interop calls can only be performed during the OnAfterRenderAsync lifecycle method.

Currently, setting the RenderMode to Server in _Host.cshtml file can solve this problem. Like this:

@(await Html.RenderComponentAsync<App>(RenderMode.Server))

Backer list / 捐赠者名单

You can support us in any of the following ways:

Thanks to the following friends for their generous donation:

Nick Name Amount Github Account Source Date
Jedi 500   微信扫码 2020-05-23
七里听香 300   社区群微信扫码 2020-04-24
时之光(倪) 200   钉钉私信 2020-03-27
徐达华 200   社区群微信扫码 2020-04-15
张聪 200   微信赞赏 2020-09-26
麦壳饼 200   微信赞赏 2020-10-18
包包 200   微信扫码 2021-03-18
*李 130 heilong240 微信扫码 2020-05-23
aaasoft 110 aaasoft 微信扫码 2020-07-10
Max 100   公众号文章《如何用Blazor实现Ant Design(二)》 2020-04-07
*斌 100 Item 支付宝扫码 2020-09-22
**翼 100   支付宝扫码 2020-12-01
王建斌@睿吃智能 100   微信红包 2021-01-04
漫天繁星中的星尘 100   微信赞赏码 2021-01-16
汽车之家 贾维维 100   微信赞赏码 2021-01-20
王建斌@睿吃智能 100   微信红包 2021-01-25
*聪 100   支付宝 2021-02-02
Dark Knight 100   微信红包 2021-07-01
张善友 100   微信红包 2021-07-26
大风 99   公众号文章《如何用Blazor实现Ant Design》 2020-03-22
**伟 88   支付宝 2021-01-11
**伟 88   支付宝 2021-02-02
*铎 66   支付宝 2021-02-02
彭立峰 60   钉钉红包 2021-02-13
何淦 59   支付宝扫码,工作坊 2020-12-15
*虹 55   支付宝 2021-02-26
张善友 50   公众号文章《如何用Blazor实现Ant Design》 2020-03-21
🇼 🇦 🇰 🇺 50 wakuflair 微信扫码 2020-05-22
独立观察员(dlgcy.com) 50   微信扫码 2020-12-01
沙漠尽头的狼 50   微信赞赏码 2020-12-19
Sky 50   微信赞赏码 2020-12-21
CongZhang 50   钉钉红包 2021-02-12
*利 50   支付宝 2021-08-04
**锋 50   支付宝 2021-08-06
**亮 34   支付宝 2021-03-30
**港 34   支付宝 2021-03-30
**俊 32   支付宝扫码 2020-04-09
Level 20   公众号文章《如何用Blazor实现Ant Design》 2020-03-21
周清平 20   公众号文章《如何用Blazor实现Ant Design》 2020-03-22
沙漠尽头的狼 dotnet9 20 dotnet9 公众号文章《如何用Blazor实现Ant Design》 2020-03-22
天天 20   公众号文章《如何用Blazor实现Ant Design》 2020-03-23
大头儿子和小头爸爸 20   公众号文章《如何用Blazor实现Ant Design》 2020-03-25
dudeping 20 dudeping 公众号文章《如何用Blazor实现Ant Design》 2020-03-25
习惯受伤 20   社区群微信扫码 2020-04-24
小淏 20 siegrainwong 微信扫码 2020-05-19
Itoktsnhc 20 Itoktsnhc 微信扫码 2020-05-20
刘涛 20   微信赞赏码 2020-12-01
**军 20   支付宝 2021-02-03
onzz 20   微信赞赏码 2021-04-27
**学 20   支付宝 2021-05-10
beckrao 16.6 beckrao 微信扫码 2020-05-21
嘿嘿 10.14   微信私信 2020-10-24
guokun 10   私信红包 2020-03-21
Rabbitism 10   支付宝扫码 2020-03-26
yuanmh-823 10 yuanmh-823 微信扫码 2020-04-26
EdiWang 10 EdiWang 微信扫码 2020-04-27
dotnet9 10   微信扫码 2020-04-29
CN-EngCM 10 CN-EngCM 微信扫码 2020-05-19
八一 10 chenboyi081 微信扫码 2020-05-20
k*a 10 [email protected] 微信扫码 2020-05-26
*u 10 支持AntDesignBlazor 微信扫码 2020-06-17
skystardust 10 skystardust 微信扫码 2020-06-27
LafSun 10 LafSun 微信赞赏 2020-08-24
zhjmao 10 zhjmao 微信赞赏 2020-08-31
Guyiming 10 Guyiming 微信赞赏 2020-09-03
YTF 10   微信扫码 2020-10-31
YTF 10   微信扫码 2020-11-14
moneymony,hoo 10   微信扫码 2020-12-01
Joygen Zhang 10   微信赞赏码 2020-12-01
赵方舟 10   微信赞赏码 2021-04-10
Joygen Zhang 10   微信红包 2021-07-01
志远 8   微信红包 2021-07-01
Einsam 5   公众号文章《如何用Blazor实现Ant Design》 2020-03-21
清平乐.cn 5   公众号文章《如何用Blazor实现Ant Design》 2020-03-21
海上明月生 5   公众号文章《如何用Blazor实现Ant Design》 2020-03-22
变形精怪 5   公众号文章《如何用Blazor实现Ant Design》 2020-03-22
aprite 5   公众号文章《如何用Blazor实现Ant Design》 2020-03-22
Augenstern 5 hongjiapeng 公众号文章《如何用Blazor实现Ant Design》 2020-03-22
杨挺|Monom 5   公众号文章《如何用Blazor实现Ant Design》 2020-03-24
ErosZy 5   公众号文章《如何用Blazor实现Ant Design》 2020-03-24
山巅看日落 5   公众号文章《如何用Blazor实现Ant Design(二)》 2020-04-05
抓革命、促生产 5   公众号文章《如何用Blazor实现Ant Design(二)》 2020-04-05
群众演员 5   公众号文章《如何用Blazor实现Ant Design》 2020-04-06
AM Wells 5   公众号文章《如何用Blazor实现Ant Design(二)》 2020-04-06
jessqiu94 5   微信扫码 2020-12-01
(名字空) 5   微信赞赏码 2020-12-01
         
Total 4610.74      

Become a sponsor

You can contact me to add your link.😊

Ant Design Blazor Roadmap

⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️

Road Map

⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️

Milestones

Please check these milestones for details

- MILESTONE: MID 2020 #3
- MILESTONE: July 2020 #255
- MILESTONE: August 2020 #254
- MILESTONE: October 2020 #593💔
- MILESTONE: December 2020 #593

  • MILESTONE: January 2021 #966
  • MILESTONE: February 2021 #967

Rich Text Editor

do you have a plan rich text ? froala,element-tiptap, they are all good to learn from

MILESTONE: MID 2020

MILESTONE: MID 2020

Components

The following are all of the components currently in ant-design. Let's Implement them together.

Docs

- [ ] Support for Dark mode #31

  • Dynamic rendering of demo and markdown #18
  • Localization for English and Chinese #59
  • Official-like theme
  • Cover offical demos as much as possible (check list: #141 ) @1002527441

Build

  • Refactor the CI/CD in Github Actions #151
  • Gitee Sync & Reload the Pages (f9066a8)
  • PR Preview Pages (#48)

blazor.server项目,使用form 组件出错

InvalidOperationException: JavaScript interop calls cannot be issued at this time. This is because the component is being statically rendererd. When prerendering is enabled, JavaScript interop calls can only be performed during the OnAfterRenderAsync lifecycle method. Microsoft.AspNetCore.Components.Server.Circuits.RemoteJSRuntime.BeginInvokeJS(long asyncHandle, string identifier, string argsJson) Microsoft.JSInterop.JSRuntime.InvokeAsync<TValue>(string identifier, CancellationToken cancellationToken, object[] args) Microsoft.JSInterop.JSRuntime.InvokeWithDefaultCancellation<T>(string identifier, object[] args) System.Runtime.CompilerServices.ValueTaskAwaiter<TResult>.GetResult() AntDesign.AntComponentBase.JsInvokeAsync<T>(string code, object[] args) AntDesign.Row+<>c__DisplayClass33_0+<<SetGutterStyle>b__0>d.MoveNext() AntDesign.EnumerableExtensions.ForEachAsync<T>(IEnumerable<T> items, Func<T, Task> func) AntDesign.Row.SetGutterStyle() AntDesign.Row.OnInitializedAsync()

blazor项目是blazor.server ,直接按照文档的示例复制的组件使用代码。无法正常运行。

希望能尽快完善推出,想知道什么时候可以正式在项目中使用。

AntRangePicker控件选择报错

blazor.server.js:15 [2020-04-29T15:08:37.853Z] Error: System.InvalidOperationException: The current thread is not associated with the Dispatcher. Use InvokeAsync() to switch execution to the Dispatcher when triggering rendering or component state.
at Microsoft.AspNetCore.Components.Dispatcher.AssertAccess()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.AddToRenderQueue(Int32 componentId, RenderFragment renderFragment)
at Microsoft.AspNetCore.Components.ComponentBase.StateHasChanged()
at AntBlazor.AntDatePicker.OnAfterRenderAsync(Boolean firstRender)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
e.log @ blazor.server.js:15
C @ blazor.server.js:8
(anonymous) @ blazor.server.js:8
(anonymous) @ blazor.server.js:1
e.invokeClientMethod @ blazor.server.js:1
e.processIncomingData @ blazor.server.js:1
connection.onreceive @ blazor.server.js:1
i.onmessage @ blazor.server.js:1
blazor.server.js:1 [2020-04-29T15:08:37.857Z] Information: Connection disconnected.
9blazor.server.js:1 Uncaught (in promise) Error: Cannot send data if the connection is not in the 'Connected' State.
at e.send (blazor.server.js:1)
at e.sendMessage (blazor.server.js:1)
at e.sendWithProtocol (blazor.server.js:1)
at e.send (blazor.server.js:1)
at blazor.server.js:8
at Object.t.dispatchEvent (blazor.server.js:8)
at blazor.server.js:8
at e.onEvent (blazor.server.js:8)
at e.onGlobalEvent (blazor.server.js:8)
e.send @ blazor.server.js:1
e.sendMessage @ blazor.server.js:1
e.sendWithProtocol @ blazor.server.js:1
e.send @ blazor.server.js:1
(anonymous) @ blazor.server.js:8
t.dispatchEvent @ blazor.server.js:8
(anonymous) @ blazor.server.js:8
(anonymous) @ blazor.server.js:8
e.onGlobalEvent @ blazor.server.js:8
blazor.server.js:1 Uncaught (in promise) Error: Cannot send data if the connection is not in the 'Connected' State.
at e.send (blazor.server.js:1)
at e.sendMessage (blazor.server.js:1)
at e.sendWithProtocol (blazor.server.js:1)
at e.send (blazor.server.js:1)
at Object.beginInvokeDotNetFromJS (blazor.server.js:8)
at c (blazor.server.js:8)
at e.invokeMethodAsync (blazor.server.js:8)
at o (interop.ts:40)
e.send @ blazor.server.js:1
e.sendMessage @ blazor.server.js:1
e.sendWithProtocol @ blazor.server.js:1
e.send @ blazor.server.js:1
beginInvokeDotNetFromJS @ blazor.server.js:8
c @ blazor.server.js:8
e.invokeMethodAsync @ blazor.server.js:8
o @ interop.ts:40

MessageService NullReferenceException

MessageService 的OnOpening事件保护级别为internal,只有在message组件上才有+=操作,即必须在使用该服务前先调用到message组件的初始化事件而不是像angular版本一样开箱即用

`@page "/Customer/Register"
@using Tkh.Shop.Core.Domain.Customer
@Inject Tkh.Shop.Data.Abstract.Customer.ICustomerDbService CustomerDbService
@Inject ILogger Logger
@Inject HttpClientService Http;
@Inject MessageService _message
@@
@if (test != null)
{

@System.Text.Json.JsonSerializer.Serialize(test)

}
something
@code {
private object test;
private bool submitting = false;
private async ValueTask SubmitAsync()
{
test = new { Name = "236587978909780" };

    await    this._message.Info(System.Text.Json.JsonSerializer.Serialize(test));
}

}
`
上述代码会抛出NullReferenceException,只有取消掉的注释才能正常操作

Bug using Icon component embedded or directly

This shows up when using the Icon component directly like this

@{
                    RenderFragment sub1Title =
                    @<span>
                        <Icon Type="user" Theme="outline" />
                        subnav 1
                    </span>;
                }

or this

<div>
    <Button  Type="primary" OnClick="_=>open()">Open</Button>

    <Drawer Width="@wdFirstLayer" Closable="true" Visible="visible1" Title='("Multi-level drawer")' OnClose="_=>close()">
        <Button Type="primary" OnClick="_=>ShowDrawer()">Two-level Drawer</Button>
        <Drawer Width="260" Closable="true" Visible="visible2" Title='("two-level drawer")' OnClose="_=>CloseDrawer()">
            <Button Type="primary">This is two-level drawer</Button>
        </Drawer>

    </Drawer>
</div>

Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100]
Unhandled exception rendering component: This instance has already started one or more requests. Properties can only be modified before sending the first request.
System.InvalidOperationException: This instance has already started one or more requests. Properties can only be modified before sending the first request.
at System.Net.Http.HttpClient.CheckDisposedOrStarted()
at System.Net.Http.HttpClient.set_BaseAddress(Uri value)
at AntDesign.IconService..ctor(HttpClient httpClient, NavigationManager navigationManager, IJSRuntime js)
at ResolveService(ILEmitResolverBuilderRuntimeContext , ServiceProviderEngineScope )
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
at Microsoft.AspNetCore.Components.ComponentFactory.<>c__DisplayClass5_0.g__Initialize|2(IServiceProvider serviceProvider, IComponent component)
at Microsoft.AspNetCore.Components.ComponentFactory.PerformPropertyInjection(IServiceProvider serviceProvider, IComponent instance)
at Microsoft.AspNetCore.Components.ComponentFactory.InstantiateComponent(IServiceProvider serviceProvider, Type componentType)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateChildComponentOnFrame(RenderTreeFrame& frame, Int32 parentComponentId)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewComponentFrame(DiffContext& diffContext, Int32 frameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext& diffContext, Int32 frameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRange1 oldTree, ArrayRange1 newTree)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit 'NMyPf0HijSCy-ybBWIPgdMz_B66lB9AzBMPp172y2CE'.
System.InvalidOperationException: This instance has already started one or more requests. Properties can only be modified before sending the first request.
at System.Net.Http.HttpClient.CheckDisposedOrStarted()
at System.Net.Http.HttpClient.set_BaseAddress(Uri value)
at AntDesign.IconService..ctor(HttpClient httpClient, NavigationManager navigationManager, IJSRuntime js)
at ResolveService(ILEmitResolverBuilderRuntimeContext , ServiceProviderEngineScope )
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
at Microsoft.AspNetCore.Components.ComponentFactory.<>c__DisplayClass5_0.g__Initialize|2(IServiceProvider serviceProvider, IComponent component)
at Microsoft.AspNetCore.Components.ComponentFactory.PerformPropertyInjection(IServiceProvider serviceProvider, IComponent instance)
at Microsoft.AspNetCore.Components.ComponentFactory.InstantiateComponent(IServiceProvider serviceProvider, Type componentType)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateChildComponentOnFrame(RenderTreeFrame& frame, Int32 parentComponentId)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewComponentFrame(DiffContext& diffContext, Int32 frameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext& diffContext, Int32 frameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRange1 oldTree, ArrayRange1 newTree)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()

Is there the other behave for the datepicker control?

when click the edit area,don't popup,easy for users to enter dates manually,
just click the right Icon ,then popup for select.
but now click the edit area,immediately popup,this is not good when it comes to small screens.
At the same time,click on the icon unresponsive.

Create the same menu as Ant-Design of React

Currently the menu is not following the React or Angular Demo pages.
It would be handy if our menu would look the same as theirs and disable the menu item's of the component is not yet implemented.
Example:
image

bug: “model”中无法输入内容

"Input" can't get focus, can't enter any text.
“input”无法获得焦点,无法输入任何文字。

批注 2020-06-08 192214

@using System.ComponentModel.DataAnnotations;
@using System.Text.Json;


<Button Type="primary" OnClick="@(()=>{ _visible = true; })">
    Open Modal
</Button>
<Modal Title="@title"
       Visible="@_visible"
       Footer="null">
    <Form Model="@model"
          LabelCol="new ColLayoutParam { Span = 8 }"
          WrapperCol="new ColLayoutParam { Span = 16 }"
          OnFinish="OnFinish"
          OnFinishFailed="OnFinishFailed">
        <FormItem Label="Username">
            <Input @bind-Value="@context.Username" />
        </FormItem>
        <FormItem Label="Password">
            <InputPassword @bind-Value="@context.Password" />
        </FormItem>
        <FormItem WrapperCol="new ColLayoutParam{ Offset = 8, Span = 16 }">
            <Checkbox @bind-Value="context.RememberMe">Remember me</Checkbox>
        </FormItem>
        <FormItem WrapperCol="new ColLayoutParam{ Offset = 8, Span = 16 }">
            <Button Type="@ButtonType.Primary" HtmlType="submit">
                Submit
            </Button>
        </FormItem>
    </Form>
</Modal>
@code{
    string title = "BasicModal";
    bool _visible = false;


    public class Model
    {
        [Required]
        public string Username { get; set; }
        [Required]
        public string Password { get; set; }
        public bool RememberMe { get; set; } = true;
    }

    private Model model = new Model();

    private void OnFinish(EditContext editContext)
    {
        Console.WriteLine($"Success:{JsonSerializer.Serialize(model)}");
    }

    private void OnFinishFailed(EditContext editContext)
    {
        Console.WriteLine($"Failed:{JsonSerializer.Serialize(model)}");
    }
}

Icons not rendering and icons docs not loading

I am experimenting blazor UI libraries these days. After going through initial setups and basic elements. I am stuck playing with icons.

  1. Got "Menu" control rendered but the icons on menu items, not sure if I have to do anything special for AntIcons.

  2. Icon docs not loading for me, tried many times in different browsers but just getting following:
    image

Can anyone help me please?

(Documentation) Language Based Routing resulting in 404 when viewing components

I live in the UK so my language is set to en-GB. The route parameter is set automatically when I go to the docs and in some cases certain components fail to render, returning 404 errors.

Unhandled exception rendering component: Response status code does not indicate success: 404 (Not Found).

In order to view the docs properly, I have to change the route language parameter to en-US.

Steps to reproduce;

  1. Open the docs
  2. Change the url to https://ant-design-blazor.github.io/en-GB/docs/introduce

Complete Docs Pages

Super excited for this project guys. I'll be following eagerly and I really hope I can contribute one day.

I've collated a small list of pages on the Docs that haven't been completed (probably because the feature isn't finished yet). So here's a checklist if you want to track the progress. Items on this list are either missing, not translated or don't come with accompanying code examples

  • Affix
  • Backtop
  • Breadcrumb
  • Card
  • Carousel
  • Checkbox
  • Divider
  • Empty
  • Grid
  • InputNumber
  • Notification
  • Radio
  • Slider
  • Steps
  • Switch
  • Tabs
  • Tags
  • Timeline

More than happy to help contribute to documentation keeping.

Thanks, guys

(Documentation) Issue with component URL Routing

Some components docs don't show up when selected from the side menu. This could be due to the route of the component razor page.

The URL of "broken" components is usually pre-pended with the /components/ route. Clicking on an item with this route will result in no component being shown.

Steps To Reproduce

  1. Go to the GitHub hosted docs, click on a component from the side menu.
  2. If the URL contains "/components" then the component razor template won't be displayed. (e.g. Button)
  3. Else the razor template will load.

Dark Mode

Are there any idea's how we will support dark mode? I assume we'll be using a CascadingParameter to choose the theme or do you have any other idea's?

Slack Link in README.md

- [![Slack Group](https://img.shields.io/badge/Slack-AntBlazor-blue.svg?style=flat-square&logo=slack)](https://join.slack.com/t/antblazor/shared_invite/zt-cw1enker-xVw3s93cTf4uhY2lRGRyRw) (Chinese & English)

This link is not working anymore, is it possible to get a link? I also wanted to discuss regarding possible contribution.

Messages do not appear, possible MessageService misconfiguration?

Hi!
I'm having trouble with messages component, I just created new wasm project from blazor template, added nuget dependency, and this simple code do not work in Index.razor page, message do dot raise:

@page "/"
@inject MessageService _messageService

<AntButton Type="primary" OnClick="OnClick">
    Display normal message
</AntButton>

@code{
    private void OnClick()
    {
        Console.WriteLine("onclick");
        _messageService.Info("This is a normal message");
    }
}

image

Does it lack some configuration?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.