Skip to content

Commit 58d7324

Browse files
committed
doc: 更新示例
1 parent b43fdaf commit 58d7324

File tree

4 files changed

+45
-50
lines changed

4 files changed

+45
-50
lines changed

src/BootstrapBlazor.Server/Components/Samples/FlipClocks.razor

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,6 @@
55

66
<h4>@((MarkupString)Localizer["FlipClocksDescription"].Value)</h4>
77

8-
<DemoBlock Title="@Localizer["BaseUsageText"]" Introduction="@Localizer["BaseUsageIntro"]" Name="Normal">
9-
<FlipClock></FlipClock>
10-
</DemoBlock>
11-
12-
13-
<DemoBlock Title="@Localizer["ShowYearText"]" Introduction="@Localizer["ShowYearIntro"]" Name="ShowYear">
14-
<FlipClock ShowYear="true" ShowMonth="true" ShowDay="true"></FlipClock>
15-
</DemoBlock>
16-
17-
<DemoBlock Title="@Localizer["ShowMonthText"]" Introduction="@Localizer["ShowMonthIntro"]" Name="ShowMonth">
18-
<FlipClock ShowMonth="true" ShowDay="true"></FlipClock>
19-
</DemoBlock>
20-
21-
<DemoBlock Title="@Localizer["ShowDayText"]" Introduction="@Localizer["ShowDayIntro"]" Name="ShowDay">
22-
<FlipClock ShowDay="true"></FlipClock>
23-
</DemoBlock>
24-
25-
<DemoBlock Title="@Localizer["ShowMinuteText"]" Introduction="@Localizer["ShowMinuteIntro"]" Name="ShowMinute">
26-
<FlipClock ShowHour="false" ShowMinute="false"></FlipClock>
27-
</DemoBlock>
28-
29-
<DemoBlock Title="@Localizer["ShowSecondText"]" Introduction="@Localizer["ShowSecondIntro"]" Name="ShowSecond">
30-
<FlipClock ShowSecond="false"></FlipClock>
31-
</DemoBlock>
32-
338
<DemoBlock Title="@Localizer["CountText"]" Introduction="@Localizer["CountIntro"]" Name="Count">
349
<FlipClock ViewMode="FlipClockViewMode.Count"></FlipClock>
3510
</DemoBlock>
@@ -84,12 +59,50 @@
8459
<Slider @bind-Value="CardGroupMarginValue" Max="28" Min="18"></Slider>
8560
</BootstrapInputGroup>
8661
</div>
62+
<div class="col-12 col-sm-6 col-lg-4">
63+
<BootstrapInputGroup>
64+
<BootstrapInputGroupLabel DisplayText="@Localizer["ShowYear"]" Width="150"></BootstrapInputGroupLabel>
65+
<Switch @bind-Value="_showYear"></Switch>
66+
</BootstrapInputGroup>
67+
</div>
68+
<div class="col-12 col-sm-6 col-lg-4">
69+
<BootstrapInputGroup>
70+
<BootstrapInputGroupLabel DisplayText="@Localizer["ShowMonth"]" Width="150"></BootstrapInputGroupLabel>
71+
<Switch @bind-Value="_showMonth"></Switch>
72+
</BootstrapInputGroup>
73+
</div>
74+
<div class="col-12 col-sm-6 col-lg-4">
75+
<BootstrapInputGroup>
76+
<BootstrapInputGroupLabel DisplayText="@Localizer["ShowDay"]" Width="150"></BootstrapInputGroupLabel>
77+
<Switch @bind-Value="_showDay"></Switch>
78+
</BootstrapInputGroup>
79+
</div>
80+
<div class="col-12 col-sm-6 col-lg-4">
81+
<BootstrapInputGroup>
82+
<BootstrapInputGroupLabel DisplayText="@Localizer["ShowHour"]" Width="150"></BootstrapInputGroupLabel>
83+
<Switch @bind-Value="_showHour"></Switch>
84+
</BootstrapInputGroup>
85+
</div>
86+
<div class="col-12 col-sm-6 col-lg-4">
87+
<BootstrapInputGroup>
88+
<BootstrapInputGroupLabel DisplayText="@Localizer["ShowMinute"]" Width="150"></BootstrapInputGroupLabel>
89+
<Switch @bind-Value="_showMinute"></Switch>
90+
</BootstrapInputGroup>
91+
</div>
92+
<div class="col-12 col-sm-6 col-lg-4">
93+
<BootstrapInputGroup>
94+
<BootstrapInputGroupLabel DisplayText="@Localizer["ShowSecond"]" Width="150"></BootstrapInputGroupLabel>
95+
<Switch @bind-Value="_showSecond"></Switch>
96+
</BootstrapInputGroup>
97+
</div>
8798
</div>
8899
</GroupBox>
89100
</section>
90101
<FlipClock BackgroundColor="radial-gradient(ellipse at center, #ac85f1 0%, #833bf8 100%)" Height="@HeightValueString"
91102
FontSize="@FontSizeValueString" CardHeight="@CardHeightValueString" CardWidth="@CardWidthValueString"
92-
CardMargin="@CardMarginValueString" CardGroupMargin="@CardGroupMarginValueString"></FlipClock>
103+
CardMargin="@CardMarginValueString" CardGroupMargin="@CardGroupMarginValueString"
104+
ShowYear="_showYear" ShowMonth="_showMonth" ShowDay="_showDay"
105+
ShowHour="_showHour" ShowMinute="_showMinute" ShowSecond="_showSecond"></FlipClock>
93106
</DemoBlock>
94107

95108
<AttributeTable Items="@GetAttributes()" />

src/BootstrapBlazor.Server/Components/Samples/FlipClocks.razor.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ public partial class FlipClocks
3636

3737

3838
private bool _isCompleted;
39+
private bool _showYear = false;
40+
private bool _showMonth = false;
41+
private bool _showDay = false;
42+
private bool _showHour = true;
43+
private bool _showMinute = true;
44+
private bool _showSecond = true;
3945

4046
private Task OnCompletedAsync()
4147
{

src/BootstrapBlazor.Server/Locales/en-US.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6800,18 +6800,6 @@
68006800
"BootstrapBlazor.Server.Components.Samples.FlipClocks": {
68016801
"FlipClocksTitle": "FlipClock",
68026802
"FlipClocksDescription": "Used for website timing or countdown",
6803-
"BaseUsageText": "Basic usage",
6804-
"BaseUsageIntro": "Synchronize display of current time",
6805-
"ShowMonthText": "Show Month",
6806-
"ShowMonthIntro": "Display month information by setting <code>ShowMonth=\"true\"</code>",
6807-
"ShowYearText": "Show Year",
6808-
"ShowYearIntro": "Display year information by setting <code>ShowYear=\"true\"</code>",
6809-
"ShowDayText": "Show Day",
6810-
"ShowDayIntro": "Display day information by setting <code>ShowDay=\"true\"</code>",
6811-
"ShowMinuteText": "not display hours and minutes",
6812-
"ShowMinuteIntro": "By setting <code>ShowHour=\"false\"</code> <code>ShowMinute=\"false\"</code> to not display hour and minute information",
6813-
"ShowSecondText": "not display seconds",
6814-
"ShowSecondIntro": "By setting <code>ShowSecond=\"false\"</code> to display hour and minute information",
68156803
"CountText": "Counter",
68166804
"CountIntro": "By setting <code>ViewMode=\"FlipClockViewMode.Count\"</code> to enable the timer function, the start time can be set using <code>StartValue</code>",
68176805
"IsCountDownText": "CountDown",

src/BootstrapBlazor.Server/Locales/zh-CN.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6800,18 +6800,6 @@
68006800
"BootstrapBlazor.Server.Components.Samples.FlipClocks": {
68016801
"FlipClocksTitle": "FlipClock 卡片翻转时钟",
68026802
"FlipClocksDescription": "用于网站计时,或者倒计时使用",
6803-
"BaseUsageText": "基本功能",
6804-
"BaseUsageIntro": "同步显示当前时间",
6805-
"ShowDayText": "显示日",
6806-
"ShowDayIntro": "通过设置 <code>ShowDay=\"true\"</code> 显示日信息",
6807-
"ShowMonthText": "显示月",
6808-
"ShowMonthIntro": "通过设置 <code>ShowMonth=\"true\"</code> 显示月信息",
6809-
"ShowYearText": "显示年",
6810-
"ShowYearIntro": "通过设置 <code>ShowYear=\"true\"</code> 显示年信息",
6811-
"ShowMinuteText": "不显示时、分",
6812-
"ShowMinuteIntro": "通过设置 <code>ShowHour=\"false\"</code> <code>ShowMinute=\"false\"</code> 不显示小时、分钟信息",
6813-
"ShowSecondText": "不显示秒",
6814-
"ShowSecondIntro": "通过设置 <code>ShowSecond=\"false\"</code> 不显示秒信息",
68156803
"CountText": "计时器",
68166804
"CountIntro": "通过设置 <code>ViewMode=\"FlipClockViewMode.Count\"</code> 开启计时功能,开始时间使用 <code>StartValue</code> 设置",
68176805
"IsCountDownText": "倒计时",

0 commit comments

Comments
 (0)