!2363 doc(#I4SDE0): update sample IsShadow/IsCollapsible for Card component

* doc: 更新示例
* doc: 更新资源文件
This commit is contained in:
Argo 2022-01-27 04:40:39 +00:00
parent c2ba4ed1cc
commit dc84f9c3fe
5 changed files with 80 additions and 70 deletions

View File

@ -1930,16 +1930,22 @@
"BasicUsageIntro": "Card is a simple example",
"FooterTitle": "Header 和 Footer",
"FooterIntro": "You can show the content by adding the CardHeader and CardFooter elements",
"IsCenterTitle": "The content is centered",
"IsCenterIntro": "By setting, <code> IsCenter-true </code> center the content",
"ColorTitle": "A card with a border color",
"ColorIntro": "By setting, <code> The </code> makes the border and Body color appropriate",
"CollapsibleTitle": "Collapsible",
"CollapsibleIntro": "Card body can collapse/expand by set <code>IsCollapsible</code> to true",
"CollapsibleBody": "Click card hader for collapse/expand card body",
"ShadowTitle": "Shadow effect",
"ShadowIntro": "Enable shadow effect by set <code>IsShadow</code> to true",
"ShadowBody": "Shadow effect sample",
"CardBody": "Get/set up CardBody",
"CardFooter": "Get/set up CardFooter",
"CardHeader": "Get/set up CardHeader",
"Class": "Style",
"Color": "Set the color of the card border",
"IsCenter": "By setting, IsCenter-true centers the content"
"IsCenter": "Make align center by set IsCenter to true",
"IsCollapsible": "Collapse card body by set IsCollapsible to true",
"IsShadow": "Add shadow effect by set IsShadow to true"
},
"BootstrapBlazor.Shared.Samples.Calendars": {
"Title": "Calendar",

View File

@ -1937,17 +1937,19 @@
"ColorTitle": "带有边框颜色的卡片",
"ColorIntro": "通过设置,<code>Color</code> 使border和Body具有相应的颜色",
"CollapsibleTitle": "可以伸缩的卡片",
"CollapsibleIntro": "通过设置,<code>IsCollapsibleIntro=true</code> 使Body可以伸缩",
"CollapsibleIntro": "通过设置 <code>IsCollapsible</code> 使 <code>Body</code> 可以伸缩",
"CollapsibleBody": "点击 Header 收缩/展开",
"ShadowTitle": "带有阴影的卡片",
"ShadowIntro": "通过设置,<code>IsShadow=true</code> Card带有阴影",
"ShadowIntro": "通过设置 <code>IsShadow</code> 开启阴影特效",
"ShadowBody": "阴影特效示例",
"CardBody": "获得/设置 CardBody",
"CardFooter": "获得/设置 CardFooter",
"CardHeader": "获得/设置 CardHeader",
"Class": "样式",
"Color": "设置卡片边框颜色",
"IsCenter": "通过设置,IsCenter=true 使内容居中",
"IsCollapsible": "通过设置,IsCollapsibleIntro=true 使CardBody可以收缩",
"IsShadow": "通过设置,IsShadow=true 使Card 具有阴影"
"IsCenter": "通过设置 <code>IsCenter</code> 使内容居中",
"IsCollapsible": "通过设置 <code>IsCollapsible</code> 使 <code>CardBody</code> 可以收缩",
"IsShadow": "通过设置 <code>IsShadow</code> 开启阴影特效"
},
"BootstrapBlazor.Shared.Samples.Calendars": {
"Title": "Calendar 日历框",

View File

@ -132,19 +132,17 @@
<DemoBlock Title="@Localizer["CollapsibleTitle"]" Introduction="@Localizer["CollapsibleIntro"]" Name="Collapsible">
<Card IsCollapsible="true" HeaderText="@Localizer["CollapsibleTitle"]">
<CardBody>
@Localizer["CollapsibleIntro"]
@Localizer["CollapsibleBody"]
</CardBody>
</Card>
</DemoBlock>
<DemoBlock Title="@Localizer["ShadowTitle"]" Introduction="@Localizer["ShadowIntro"]" Name="Collapsible">
<DemoBlock Title="@Localizer["ShadowTitle"]" Introduction="@Localizer["ShadowIntro"]" Name="Shadow">
<Card IsShadow="true" HeaderText="@Localizer["ShadowTitle"]">
<CardBody>
@Localizer["ShadowIntro"]
@Localizer["ShadowBody"]
</CardBody>
</Card>
</DemoBlock>
<AttributeTable Items="GetAttributes()" />

View File

@ -18,62 +18,67 @@ public sealed partial class Cards
/// <returns></returns>
private IEnumerable<AttributeItem> GetAttributes() => new AttributeItem[]
{
new AttributeItem() {
Name = "CardBody",
Description = Localizer["CardBody"],
Type = "RenderFragment",
ValueList = " — ",
DefaultValue = " — "
},
new AttributeItem() {
Name = "CardFooter",
Description = Localizer["CardFooter"],
Type = "RenderFragment",
ValueList = " — ",
DefaultValue = " — "
},
new AttributeItem() {
Name = "CardHeader",
Description = Localizer["CardHeader"],
Type = "RenderFragment",
ValueList = " — ",
DefaultValue = " — "
},
new AttributeItem() {
Name = "Class",
Description = Localizer["Class"],
Type = "string",
ValueList = " — ",
DefaultValue = " — "
},
new AttributeItem{
Name = "Color",
Description = Localizer["Color"],
Type = "Color",
ValueList = "None / Primary / Secondary / Success / Danger / Warning / Info / Light / Dark",
DefaultValue = " — "
},
new AttributeItem{
Name = "IsCenter",
Description = Localizer["IsCenter"],
Type = "boolean",
ValueList = "true / false",
DefaultValue = "false"
},
new AttributeItem{
Name = "IsCollapsible",
Description = Localizer["IsCollapsible"],
Type = "boolean",
ValueList = "true / false",
DefaultValue = "false"
},
new AttributeItem{
Name = "IsShadow",
Description = Localizer["IsShadow"],
Type = "boolean",
ValueList = "true / false",
DefaultValue = "false"
},
new AttributeItem
{
Name = "CardBody",
Description = Localizer["CardBody"],
Type = "RenderFragment",
ValueList = " — ",
DefaultValue = " — "
},
new AttributeItem() {
Name = "CardFooter",
Description = Localizer["CardFooter"],
Type = "RenderFragment",
ValueList = " — ",
DefaultValue = " — "
},
new AttributeItem
{
Name = "CardHeader",
Description = Localizer["CardHeader"],
Type = "RenderFragment",
ValueList = " — ",
DefaultValue = " — "
},
new AttributeItem
{
Name = "Class",
Description = Localizer["Class"],
Type = "string",
ValueList = " — ",
DefaultValue = " — "
},
new AttributeItem {
Name = "Color",
Description = Localizer["Color"],
Type = "Color",
ValueList = "None / Primary / Secondary / Success / Danger / Warning / Info / Light / Dark",
DefaultValue = " — "
},
new AttributeItem {
Name = "IsCenter",
Description = Localizer["IsCenter"],
Type = "boolean",
ValueList = "true / false",
DefaultValue = "false"
},
new AttributeItem
{
Name = "IsCollapsible",
Description = Localizer["IsCollapsible"],
Type = "boolean",
ValueList = "true / false",
DefaultValue = "false"
},
new AttributeItem
{
Name = "IsShadow",
Description = Localizer["IsShadow"],
Type = "boolean",
ValueList = "true / false",
DefaultValue = "false"
}
};
}

View File

@ -3,7 +3,6 @@
// Website: https://www.blazor.zone or https://argozhang.github.io/
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using System.Threading.Tasks;
namespace BootstrapBlazor.Components;