docs: fix infinite loop at home page and duplicated key (#3372)

This commit is contained in:
James Yeung 2023-07-25 23:00:56 +08:00 committed by GitHub
parent f9cfdc54e3
commit 679a83410a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -2,7 +2,7 @@
order: 2
title:
zh-CN: 不可用
en-US: Basic
en-US: Disabled
---
## zh-CN

View File

@ -54,7 +54,7 @@
{
@foreach (var docDemo in docDemos)
{
<RazorBox Demo="@docDemo" @key="@($"{_demoComponent.Title}-{docDemo.Title}")" />
<RazorBox Demo="@docDemo" @key="@($"{_demoComponent.Title}-{docDemo.Type}")" />
}
}
else
@ -92,7 +92,7 @@
foreach (var demo in demos)
{
<AntDesign.Col Span="24" Class="code-boxes-col-1-1" Style="padding-left: 8px; padding-right: 8px;">
<CodeBox CodeExpand="_expandAllCode" Demo="demo" @key="@($"{_demoComponent.Title}-{demo.Title}")" ComponentName="@_demoComponent.Title"></CodeBox>
<CodeBox CodeExpand="_expandAllCode" Demo="demo" @key="demo.Type" ComponentName="@_demoComponent.Title"></CodeBox>
</AntDesign.Col>
}
}
@ -104,13 +104,13 @@
<AntDesign.Col Span="12" Class="code-boxes-col-2-1" Style="padding-left: 8px; padding-right: 8px;">
@foreach (var demo in leftList)
{
<CodeBox CodeExpand="_expandAllCode" Demo="demo" @key="@($"{_demoComponent.Title}-{demo.Title}")" ComponentName="@_demoComponent.Title"></CodeBox>
<CodeBox CodeExpand="_expandAllCode" Demo="demo" @key="demo.Type" ComponentName="@_demoComponent.Title"></CodeBox>
}
</AntDesign.Col>
<AntDesign.Col Span="12" Class="code-boxes-col-2-1" Style="padding-left: 8px; padding-right: 8px;">
@foreach (var demo in rightList)
{
<CodeBox CodeExpand="_expandAllCode" Demo="demo" @key="@($"{_demoComponent.Title}-{demo.Title}")" ComponentName="@_demoComponent.Title"></CodeBox>
<CodeBox CodeExpand="_expandAllCode" Demo="demo" @key="demo.Type" ComponentName="@_demoComponent.Title"></CodeBox>
}
</AntDesign.Col>
}

View File

@ -29,6 +29,7 @@ namespace AntDesign.Docs.Pages
private void HandleLanguageChanged(object _, CultureInfo culture)
{
_rendered = true;
_ = FetchData();
}
@ -44,6 +45,7 @@ namespace AntDesign.Docs.Pages
if (_rendered)
{
_rendered = false;
_ = FetchData();
}
}