* docs: fix subtitle

* fix anchor

* fix datepicker
This commit is contained in:
James Yeung 2024-09-03 23:24:48 +08:00 коммит произвёл GitHub
Родитель 9c8d6288eb
Коммит 3ad90ba49e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
31 изменённых файлов: 53 добавлений и 30 удалений

Просмотреть файл

@ -20,7 +20,7 @@ namespace AntDesign
/// <para>For displaying anchor hyperlinks on page and jumping between them.</para>
/// </summary>
/// <seealso cref="AnchorLink" />
[Documentation(DocumentationCategory.Components, DocumentationType.Other, "https://gw.alipayobjects.com/zos/alicdn/_1-C1JwsC/Anchor.svg",Title = "Anchor", SubTitle = "锚点")]
[Documentation(DocumentationCategory.Components, DocumentationType.Other, "https://gw.alipayobjects.com/zos/alicdn/_1-C1JwsC/Anchor.svg", Title = "Anchor", SubTitle = "锚点")]
public partial class Anchor : AntDomComponentBase, IAnchor
{
private string _ballClass = "ant-anchor-ink-ball";

Просмотреть файл

@ -19,7 +19,7 @@ namespace AntDesign
</summary>
<seealso cref="AntDesign.BadgeRibbon" />
*/
[Documentation(DocumentationCategory.Components, DocumentationType.DataDisplay, "https://gw.alipayobjects.com/zos/antfincdn/6%26GF9WHwvY/Badge.svg", Title="Badge", SubTitle = "徽标数")]
[Documentation(DocumentationCategory.Components, DocumentationType.DataDisplay, "https://gw.alipayobjects.com/zos/antfincdn/6%26GF9WHwvY/Badge.svg", Title = "Badge", SubTitle = "徽标数")]
public partial class Badge : AntDomComponentBase
{
/// <summary>

Просмотреть файл

@ -35,7 +35,7 @@ namespace AntDesign
</summary>
<seealso cref="DownloadButton" />
*/
[Documentation(DocumentationCategory.Components, DocumentationType.General, "https://gw.alipayobjects.com/zos/alicdn/fNUKzY1sk/Button.svg",Title = "Button",SubTitle = "按钮")]
[Documentation(DocumentationCategory.Components, DocumentationType.General, "https://gw.alipayobjects.com/zos/alicdn/fNUKzY1sk/Button.svg", Title = "Button", SubTitle = "按钮")]
public partial class Button : AntDomComponentBase
{
private string _formSize;

Просмотреть файл

@ -18,7 +18,7 @@ namespace AntDesign
<para>When data is in the form of dates, such as schedules, timetables, prices calendar, lunar calendar. This component also supports Year/Month switch.</para>
</summary>
*/
[Documentation(DocumentationCategory.Components, DocumentationType.DataDisplay, "https://gw.alipayobjects.com/zos/antfincdn/dPQmLq08DI/Calendar.svg", Columns = 1,Title = "Calendar", SubTitle = "级联选择")]
[Documentation(DocumentationCategory.Components, DocumentationType.DataDisplay, "https://gw.alipayobjects.com/zos/antfincdn/dPQmLq08DI/Calendar.svg", Columns = 1, Title = "Calendar", SubTitle = "日历")]
public partial class Calendar : AntDomComponentBase, IDatePicker
{
DateTime IDatePicker.CurrentDate { get; set; } = DateTime.Now;

Просмотреть файл

@ -22,7 +22,7 @@ namespace AntDesign
<seealso cref="CardMeta"/>
<seealso cref="CardAction"/>
*/
[Documentation(DocumentationCategory.Components, DocumentationType.DataDisplay, "https://gw.alipayobjects.com/zos/antfincdn/NqXt8DJhky/Card.svg", Columns = 1, Title = "Card",SubTitle = "卡片")]
[Documentation(DocumentationCategory.Components, DocumentationType.DataDisplay, "https://gw.alipayobjects.com/zos/antfincdn/NqXt8DJhky/Card.svg", Columns = 1, Title = "Card", SubTitle = "卡片")]
public partial class Card : AntDomComponentBase
{
/// <summary>

Просмотреть файл

@ -26,7 +26,7 @@ namespace AntDesign
</summary>
<seealso cref="CarouselSlick"/>
*/
[Documentation(DocumentationCategory.Components, DocumentationType.DataDisplay, "https://gw.alipayobjects.com/zos/antfincdn/%24C9tmj978R/Carousel.svg", Title="Carousel", SubTitle = "走马灯")]
[Documentation(DocumentationCategory.Components, DocumentationType.DataDisplay, "https://gw.alipayobjects.com/zos/antfincdn/%24C9tmj978R/Carousel.svg", Title = "Carousel", SubTitle = "走马灯")]
public partial class Carousel : AntDomComponentBase
{
private const string PrefixCls = "ant-carousel";

Просмотреть файл

@ -28,7 +28,7 @@ namespace AntDesign
<seealso cref="CascaderNode"/>
<seealso cref="TriggerBoundaryAdjustMode"/>
*/
[Documentation(DocumentationCategory.Components, DocumentationType.DataEntry, "https://gw.alipayobjects.com/zos/alicdn/UdS8y8xyZ/Cascader.svg",Title = "Cascader",SubTitle = "日历")]
[Documentation(DocumentationCategory.Components, DocumentationType.DataEntry, "https://gw.alipayobjects.com/zos/alicdn/UdS8y8xyZ/Cascader.svg", Title = "Cascader", SubTitle = "级联选择")]
public partial class Cascader : AntInputComponentBase<string>
{
/// <summary>

Просмотреть файл

@ -23,7 +23,7 @@ namespace AntDesign
</summary>
<seealso cref="Panel"/>
*/
[Documentation(DocumentationCategory.Components, DocumentationType.DataDisplay, "https://gw.alipayobjects.com/zos/alicdn/IxH16B9RD/Collapse.svg", Columns = 1, Title ="Collapse",SubTitle = "折叠面板")]
[Documentation(DocumentationCategory.Components, DocumentationType.DataDisplay, "https://gw.alipayobjects.com/zos/alicdn/IxH16B9RD/Collapse.svg", Columns = 1, Title = "Collapse", SubTitle = "折叠面板")]
public partial class Collapse : AntDomComponentBase
{
#region Parameter

Просмотреть файл

@ -26,7 +26,7 @@ namespace AntDesign
<seealso cref="QuarterPicker{TValue}"/>
<seealso cref="TriggerBoundaryAdjustMode"/>
*/
[Documentation(DocumentationCategory.Components, DocumentationType.DataEntry, "https://gw.alipayobjects.com/zos/alicdn/RT_USzA48/DatePicker.svg",Title = "DatePicker", SubTitle = "日期选择框")]
[Documentation(DocumentationCategory.Components, DocumentationType.DataEntry, "https://gw.alipayobjects.com/zos/alicdn/RT_USzA48/DatePicker.svg", Title = "DatePicker", SubTitle = "日期选择框")]
public partial class DatePicker<TValue> : DatePickerBase<TValue>
{
/// <summary>

Просмотреть файл

@ -27,7 +27,7 @@ namespace AntDesign
internal const int START_PICKER_INDEX = 0;
internal const int END_PICKER_INDEX = 0;
[CascadingParameter(Name = "PrefixCls")]
//[CascadingParameter(Name = "PrefixCls")]
internal string PrefixCls { get; set; } = "ant-picker";
/// <summary>

Просмотреть файл

@ -18,7 +18,7 @@ namespace AntDesign
</list>
</summary>
*/
[Documentation(DocumentationCategory.Components, DocumentationType.Layout, "https://gw.alipayobjects.com/zos/alicdn/5swjECahe/Divider.svg",Title = "Divider",SubTitle = "分割线")]
[Documentation(DocumentationCategory.Components, DocumentationType.Layout, "https://gw.alipayobjects.com/zos/alicdn/5swjECahe/Divider.svg", Title = "Divider", SubTitle = "分割线")]
public partial class Divider : AntDomComponentBase
{
/// <summary>

Просмотреть файл

@ -31,7 +31,7 @@ namespace AntDesign
<seealso cref="DrawerOptions" />
<seealso cref="DrawerRef" />
*/
[Documentation(DocumentationCategory.Components, DocumentationType.Feedback, "https://gw.alipayobjects.com/zos/alicdn/7z8NJQhFb/Drawer.svg", Title ="Drawer", SubTitle = "分割线")]
[Documentation(DocumentationCategory.Components, DocumentationType.Feedback, "https://gw.alipayobjects.com/zos/alicdn/7z8NJQhFb/Drawer.svg", Title = "Drawer", SubTitle = "抽屉")]
public partial class Drawer : AntDomComponentBase
{
#region Parameters

Просмотреть файл

@ -26,7 +26,7 @@ namespace AntDesign
</summary>
*/
[Documentation(DocumentationCategory.Components, DocumentationType.Layout, "https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*SMzgSJZE_AwAAAAAAAAAAAAADrJ8AQ/original", Columns = 1, Title = "Flex",SubTitle = "弹性布局")]
[Documentation(DocumentationCategory.Components, DocumentationType.Layout, "https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*SMzgSJZE_AwAAAAAAAAAAAAADrJ8AQ/original", Columns = 1, Title = "Flex", SubTitle = "弹性布局")]
public partial class Flex : AntDomComponentBase
{
/// <summary>

Просмотреть файл

@ -33,7 +33,7 @@ namespace AntDesign
<seealso cref="FormValidationRule"/>
<seealso cref="FormValidateErrorMessages"/>
*/
[Documentation(DocumentationCategory.Components, DocumentationType.DataEntry, "https://gw.alipayobjects.com/zos/alicdn/ORmcdeaoO/Form.svg", Columns = 1, Title = "Form",SubTitle = "表单")]
[Documentation(DocumentationCategory.Components, DocumentationType.DataEntry, "https://gw.alipayobjects.com/zos/alicdn/ORmcdeaoO/Form.svg", Columns = 1, Title = "Form", SubTitle = "表单")]
#if NET6_0_OR_GREATER
[CascadingTypeParameter(nameof(TModel))]
#endif

Просмотреть файл

@ -15,7 +15,7 @@ namespace AntDesign
Semantic vector graphics. Before use icons
</summary>
*/
[Documentation(DocumentationCategory.Components, DocumentationType.General, "https://gw.alipayobjects.com/zos/alicdn/rrwbSt3FQ/Icon.svg", Title = "Icon",SubTitle = "图标")]
[Documentation(DocumentationCategory.Components, DocumentationType.General, "https://gw.alipayobjects.com/zos/alicdn/rrwbSt3FQ/Icon.svg", Title = "Icon", SubTitle = "图标")]
public partial class Icon : AntDomComponentBase
{
/// <summary>

Просмотреть файл

@ -30,7 +30,7 @@ namespace AntDesign
<seealso cref="InputGroup"/>
<seealso cref="InputPassword"/>
*/
[Documentation(DocumentationCategory.Components, DocumentationType.DataEntry, "https://gw.alipayobjects.com/zos/alicdn/xS9YEJhfe/Input.svg", Title="Input", SubTitle = "输入框")]
[Documentation(DocumentationCategory.Components, DocumentationType.DataEntry, "https://gw.alipayobjects.com/zos/alicdn/xS9YEJhfe/Input.svg", Title = "Input", SubTitle = "输入框")]
public class Input<TValue> : AntInputComponentBase<TValue>
{
protected const string PrefixCls = "ant-input";

Просмотреть файл

@ -22,6 +22,7 @@ namespace AntDesign
<para>When need to mention someone or something.</para>
</summary>
<seealso cref="MentionsOption" />
*/
[Documentation(DocumentationCategory.Components, DocumentationType.DataEntry, "https://gw.alipayobjects.com/zos/alicdn/jPE-itMFM/Mentions.svg", Title = "Mentions", SubTitle = "提及")]
public partial class Mentions

Просмотреть файл

@ -11,15 +11,21 @@ namespace AntDesign
public partial class MentionsOption
{
[CascadingParameter]
public Mentions Mentions { get; set; }
private Mentions Mentions { get; set; }
/// <summary>
/// The value of option.
/// </summary>
[Parameter]
public string Value { get; set; }
/// <summary>
/// The content of option.
/// </summary>
[Parameter]
public RenderFragment ChildContent { get; set; }
public bool Active => Mentions?.ActiveOptionValue == Value;
internal bool Active => Mentions?.ActiveOptionValue == Value;
protected override async Task OnInitializedAsync()
{

Просмотреть файл

@ -35,7 +35,7 @@ namespace AntDesign
<para>Please ensure that the child node of <c>Popover</c> accepts <c>onMouseEnter</c>, <c>onMouseLeave</c>, <c>onFocus</c>, <c>onClick</c> events.</para>
</summary>
*/
[Documentation(DocumentationCategory.Components, DocumentationType.DataDisplay, "https://gw.alipayobjects.com/zos/alicdn/1PNL1p_cO/Popover.svg", Title="Popover", SubTitle = "气泡卡片")]
[Documentation(DocumentationCategory.Components, DocumentationType.DataDisplay, "https://gw.alipayobjects.com/zos/alicdn/1PNL1p_cO/Popover.svg", Title = "Popover", SubTitle = "气泡卡片")]
public partial class Popover : OverlayTrigger
{
/// <summary>

Просмотреть файл

@ -13,7 +13,10 @@ namespace AntDesign
#if NET6_0_OR_GREATER
[CascadingTypeParameter(nameof(TValue))]
#endif
/// <summary>
/// A group of radio buttons
/// </summary>
/// <typeparam name="TValue"> The type of <see cref="Radio{TValue}.Value" />, should have the same type with <see cref="Radio{TValue}" />s'. </typeparam>
public partial class RadioGroup<TValue> : AntInputComponentBase<TValue>
{
[Inject]

Просмотреть файл

@ -17,7 +17,7 @@ namespace AntDesign
<para>Use when important operations need to inform the user to process the results and the feedback is more complicated.</para>
</summary>
*/
[Documentation(DocumentationCategory.Components, DocumentationType.Feedback, "https://gw.alipayobjects.com/zos/alicdn/9nepwjaLa/Result.svg", Columns = 1, Title ="Result", SubTitle = "结果")]
[Documentation(DocumentationCategory.Components, DocumentationType.Feedback, "https://gw.alipayobjects.com/zos/alicdn/9nepwjaLa/Result.svg", Columns = 1, Title = "Result", SubTitle = "结果")]
public partial class Result : AntDomComponentBase
{
/// <summary>

Просмотреть файл

@ -24,7 +24,7 @@ namespace AntDesign
</summary>
<seealso cref="SegmentedItem{TValue}"/>
*/
[Documentation(DocumentationCategory.Components, DocumentationType.DataDisplay, "https://gw.alipayobjects.com/zos/bmw-prod/a3ff040f-24ba-43e0-92e9-c845df1612ad.svg",Title = "Segmented",SubTitle = "分段控制器")]
[Documentation(DocumentationCategory.Components, DocumentationType.DataDisplay, "https://gw.alipayobjects.com/zos/bmw-prod/a3ff040f-24ba-43e0-92e9-c845df1612ad.svg", Title = "Segmented", SubTitle = "分段控制器")]
#if NET6_0_OR_GREATER
[CascadingTypeParameter(nameof(TValue))]
#endif

Просмотреть файл

@ -30,7 +30,7 @@ namespace AntDesign
</list>
</summary>
*/
[Documentation(DocumentationCategory.Components, DocumentationType.DataEntry, "https://gw.alipayobjects.com/zos/alicdn/_0XzgOis7/Select.svg",Title="Select",SubTitle = "选择器")]
[Documentation(DocumentationCategory.Components, DocumentationType.DataEntry, "https://gw.alipayobjects.com/zos/alicdn/_0XzgOis7/Select.svg", Title= "Select", SubTitle = "选择器")]
#if NET6_0_OR_GREATER
[CascadingTypeParameter(nameof(TItem))]
[CascadingTypeParameter(nameof(TItemValue))]

Просмотреть файл

@ -26,7 +26,7 @@ namespace AntDesign
</summary>
<seealso cref="SliderMark"/>
*/
[Documentation(DocumentationCategory.Components, DocumentationType.DataEntry, "https://gw.alipayobjects.com/zos/alicdn/HZ3meFc6W/Silder.svg", Title = "Slider",SubTitle = "滑动输入条")]
[Documentation(DocumentationCategory.Components, DocumentationType.DataEntry, "https://gw.alipayobjects.com/zos/alicdn/HZ3meFc6W/Silder.svg", Title = "Slider", SubTitle = "滑动输入条")]
public partial class Slider<TValue> : AntInputComponentBase<TValue>
{
private const string PreFixCls = "ant-slider";

Просмотреть файл

@ -16,6 +16,7 @@ namespace AntDesign
<para>Avoid components clinging together and set a unified space.</para>
</summary>
<seealso cref="SpaceItem"/>
*/
[Documentation(DocumentationCategory.Components, DocumentationType.Layout, "https://gw.alipayobjects.com/zos/antfincdn/wc6%263gJ0Y8/Space.svg", Columns = 1, Title = "Space", SubTitle = "间距")]
public partial class Space : AntDomComponentBase

Просмотреть файл

@ -7,11 +7,17 @@ using Microsoft.AspNetCore.Components;
namespace AntDesign
{
/// <summary>
/// <see cref="Space"/> item, use to set item style
/// </summary>
public partial class SpaceItem : AntDomComponentBase
{
[CascadingParameter]
public Space Parent { get; set; }
private Space Parent { get; set; }
/// <summary>
/// Child content
/// </summary>
[Parameter]
public RenderFragment ChildContent { get; set; }

Просмотреть файл

@ -8,6 +8,9 @@ using Microsoft.AspNetCore.Components.Web;
namespace AntDesign
{
/// <summary>
/// A step in a Steps component
/// </summary>
public partial class Step : AntDomComponentBase
{
private string _status = "wait";

Просмотреть файл

@ -20,7 +20,7 @@ namespace AntDesign
</summary>
<seealso cref="Step"/>
*/
[Documentation(DocumentationCategory.Components, DocumentationType.Navigation, "https://gw.alipayobjects.com/zos/antfincdn/UZYqMizXHaj/Steps.svg", Columns = 1, Title = "Steps",SubTitle = "步骤条")]
[Documentation(DocumentationCategory.Components, DocumentationType.Navigation, "https://gw.alipayobjects.com/zos/antfincdn/UZYqMizXHaj/Steps.svg", Columns = 1, Title = "Steps", SubTitle = "步骤条")]
public partial class Steps : AntDomComponentBase
{
private bool _showProgressDot;

Просмотреть файл

@ -23,7 +23,7 @@ namespace AntDesign
</summary>
<seealso cref="TimelineItem" />
*/
[Documentation(DocumentationCategory.Components, DocumentationType.DataDisplay, "https://gw.alipayobjects.com/zos/antfincdn/vJmo00mmgR/Timeline.svg", Title="Timeline", SubTitle = "时间轴")]
[Documentation(DocumentationCategory.Components, DocumentationType.DataDisplay, "https://gw.alipayobjects.com/zos/antfincdn/vJmo00mmgR/Timeline.svg", Title = "Timeline", SubTitle = "时间轴")]
public partial class Timeline : AntDomComponentBase
{
/// <summary>

Просмотреть файл

@ -32,7 +32,7 @@ namespace AntDesign
</para>
</summary>
*/
[Documentation(DocumentationCategory.Components, DocumentationType.DataEntry, "https://gw.alipayobjects.com/zos/alicdn/QAXskNI4G/Transfer.svg", Columns = 1, Title = "Transfer",SubTitle = "穿梭框")]
[Documentation(DocumentationCategory.Components, DocumentationType.DataEntry, "https://gw.alipayobjects.com/zos/alicdn/QAXskNI4G/Transfer.svg", Columns = 1, Title = "Transfer", SubTitle = "穿梭框")]
public partial class Transfer : AntDomComponentBase
{
private const string PrefixName = "ant-transfer";

Просмотреть файл

@ -27,7 +27,7 @@
<Anchor Key="@_demoComponent.Title">
@foreach (var demo in _anchors)
{
<AnchorLink Href="@($"/{CurrentLanguage}/components/{_demoComponent.Title}#components-{_demoComponent.Title.ToLower()}-demo-{demo.Name}")" Title="@demo.Title" />
<AnchorLink Href="@($"/{CurrentLanguage}/components/{_demoComponent.Title}#components-{_demoComponent.Title.ToLower()}-demo-{demo.Name.ToLower()}")" Title="@demo.Title" />
}
@if (!string.IsNullOrEmpty(_demoComponent.ApiDoc))
{
@ -41,7 +41,10 @@
<section class="markdown">
<h1>
@_demoComponent.Title
<span class="subtitle">@_demoComponent.SubTitle</span>
@if (CurrentLanguage == "zh-CN")
{
<span class="subtitle">@_demoComponent.SubTitle</span>
}
<span class="widget"></span>
<Tooltip Title="@Localizer["app.content.edit-demo"]">
<Unbound>