|
201 | 201 | </div> |
202 | 202 | </div> |
203 | 203 | </ValidateForm> |
| 204 | +</DemoBlock> |
| 205 | + |
| 206 | +<DemoBlock Title="@Localizer["LabelsRowLabelWidthTitle"]" Introduction="@Localizer["LabelsRowLabelWidthIntro"]" Name="RowLabelWidth"> |
| 207 | + <section ignore> |
| 208 | + <p>@((MarkupString)LocalizerForm["ValidateFormNormalFormLabelWidth"].Value)</p> |
| 209 | + <p>@((MarkupString)LocalizerForm["LongDisplayDescription"].Value)</p> |
| 210 | + <Pre>:root { |
| 211 | + --bb-row-label-width: 120px; |
| 212 | +}</Pre> |
| 213 | + </section> |
204 | 214 |
|
205 | | - <p class="mt-3"> |
206 | | - @((MarkupString)Localizer["LabelsValidateForm2Description4"].Value) |
207 | | - <div>@((MarkupString)LocalizerForm["ValidateFormNormalFormLabelWidth"].Value)</div> |
208 | | - <div class="mt-2">@((MarkupString)LocalizerForm["LongDisplayDescription"].Value)</div> |
209 | | - </p> |
210 | 215 | <ValidateForm Model="@Dummy4"> |
211 | 216 | <div class="row g-3"> |
212 | 217 | <div class="col-12"> |
|
220 | 225 | </div> |
221 | 226 | </ValidateForm> |
222 | 227 | </DemoBlock> |
| 228 | + |
| 229 | +<DemoBlock Title="@Localizer["LabelsWidthTitle"]" Introduction="@Localizer["LabelsWidthIntro"]" Name="LabelWidth"> |
| 230 | + <section ignore> |
| 231 | + <p>@((MarkupString)Localizer["LabelsWidthDescription"].Value)</p> |
| 232 | + <Pre><ValidateForm Model="@@Dummy4" LabelWidth="100"> |
| 233 | + <EditorForm TModel="Foo" ItemsPerRow="2" RowType="RowType.Inline" LabelAlign="Alignment.Right" LabelWidth="120" |
| 234 | + AutoGenerateAllItem="false"> |
| 235 | + <FieldItems> |
| 236 | + <EditorItem @@bind-Field="@@Dummy4.Name"></EditorItem> |
| 237 | + </FieldItems> |
| 238 | + </EditorForm> |
| 239 | + |
| 240 | + <BootstrapLabelSetting LabelWidth="220"> |
| 241 | + <div class="row form-inline g-3 mt-0"> |
| 242 | + <div class="col-12 col-sm-6"> |
| 243 | + <BootstrapLabel LabelWidth="180" Value="@@LocalizerForm["LongDisplayText"]"></BootstrapLabel> |
| 244 | + <BootstrapInput @@bind-Value="Dummy4.Name" ShowLabel="false" /> |
| 245 | + </div> |
| 246 | + </div> |
| 247 | + </BootstrapLabelSetting> |
| 248 | +</ValidateForm></Pre> |
| 249 | + <p> |
| 250 | + @((MarkupString)Localizer["LabelsWidthCode1"].Value) <b>180</b> |
| 251 | + </p> |
| 252 | + <ul class="ul-demo"> |
| 253 | + <li><code>ValidateForm</code> <b>100</b></li> |
| 254 | + <li><code>EditorForm</code> <b>120</b></li> |
| 255 | + <li><code>BootstrapLabelSetting</code> <b>220</b></li> |
| 256 | + <li><code>BootstrapLabel</code> <b>180</b></li> |
| 257 | + </ul> |
| 258 | + </section> |
| 259 | + <ValidateForm Model="@Dummy4" LabelWidth="100"> |
| 260 | + <EditorForm TModel="Foo" ItemsPerRow="2" RowType="RowType.Inline" LabelAlign="Alignment.Right" LabelWidth="120" |
| 261 | + AutoGenerateAllItem="false"> |
| 262 | + <FieldItems> |
| 263 | + <EditorItem @bind-Field="@Dummy4.Name"></EditorItem> |
| 264 | + </FieldItems> |
| 265 | + </EditorForm> |
| 266 | + |
| 267 | + <BootstrapLabelSetting LabelWidth="220"> |
| 268 | + <div class="row form-inline g-3 mt-0"> |
| 269 | + <div class="col-12 col-sm-6"> |
| 270 | + <BootstrapLabel LabelWidth="180" Value="@LocalizerForm["LongDisplayText"]"></BootstrapLabel> |
| 271 | + <BootstrapInput @bind-Value="Dummy4.Name" ShowLabel="false" /> |
| 272 | + </div> |
| 273 | + </div> |
| 274 | + </BootstrapLabelSetting> |
| 275 | + </ValidateForm> |
| 276 | +</DemoBlock> |
0 commit comments