mirror of https://github.com/abpframework/abp.git
17 changed files with 681 additions and 55 deletions
@ -0,0 +1,17 @@ |
|||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.Shared.Demos.DropdownsDemo |
||||
|
{ |
||||
|
public class DropDownDemoDemoModel |
||||
|
{ |
||||
|
[Required] |
||||
|
[EmailAddress] |
||||
|
public string EmailAddress { get; set; } |
||||
|
|
||||
|
[Required] |
||||
|
[DataType(DataType.Password)] |
||||
|
public string Password { get; set; } |
||||
|
|
||||
|
public bool RememberMe { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,159 @@ |
|||||
|
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.Shared.Demos.DynamicFormsDemo |
||||
|
@model DynamicFormsDemoModel |
||||
|
<div class="row"> |
||||
|
<div class="col-md-12"> |
||||
|
<h3>The form model is:</h3> |
||||
|
<hr /> |
||||
|
<textarea style="width:100%;height: 320px" disabled> |
||||
|
public List<SelectListItem> CountryList { get; set; } = new List<SelectListItem> |
||||
|
{ |
||||
|
new SelectListItem { Value = "CA", Text = "Canada"}, |
||||
|
new SelectListItem { Value = "US", Text = "USA"}, |
||||
|
new SelectListItem { Value = "UK", Text = "United Kingdom"}, |
||||
|
new SelectListItem { Value = "RU", Text = "Russia"} |
||||
|
}; |
||||
|
|
||||
|
public enum CarType |
||||
|
{ |
||||
|
Sedan, |
||||
|
Hatchback, |
||||
|
StationWagon, |
||||
|
Coupe |
||||
|
} |
||||
|
|
||||
|
public class DetailedModel |
||||
|
{ |
||||
|
[Required] |
||||
|
[Placeholder("Enter your name...")] |
||||
|
[Display(Name = "Name")] |
||||
|
public string Name { get; set; } |
||||
|
|
||||
|
[TextArea(Rows = 4)] |
||||
|
[Display(Name = "Description")] |
||||
|
[InputInfoText("Describe Yourself")] |
||||
|
public string Description { get; set; } |
||||
|
|
||||
|
[Required] |
||||
|
[DataType(DataType.Password)] |
||||
|
[Display(Name = "Password")] |
||||
|
public string Password { get; set; } |
||||
|
|
||||
|
[Display(Name = "Is Active")] |
||||
|
public bool IsActive { get; set; } |
||||
|
|
||||
|
[Required] |
||||
|
[Display(Name = "Age")] |
||||
|
public int Age { get; set; } |
||||
|
|
||||
|
[Required] |
||||
|
[Display(Name = "My Car Type")] |
||||
|
public CarType MyCarType { get; set; } |
||||
|
|
||||
|
[Required] |
||||
|
[AbpRadioButton(Inline = true)] |
||||
|
[Display(Name = "Your Car Type")] |
||||
|
public CarType YourCarType { get; set; } |
||||
|
|
||||
|
[DataType(DataType.Date)] |
||||
|
[Display(Name = "Day")] |
||||
|
public DateTime Day { get; set; } |
||||
|
|
||||
|
[SelectItems(nameof(CountryList))] |
||||
|
[Display(Name = "Country")] |
||||
|
public string Country { get; set; } |
||||
|
|
||||
|
[SelectItems(nameof(CountryList))] |
||||
|
[Display(Name = "Neighbor Countries")] |
||||
|
public List<string> NeighborCountries { get; set; } |
||||
|
|
||||
|
public DetailedModel() |
||||
|
{ |
||||
|
Name = ""; |
||||
|
Description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."; |
||||
|
IsActive = true; |
||||
|
Age = 65; |
||||
|
Day = DateTime.Now; |
||||
|
MyCarType = CarType.Coupe; |
||||
|
YourCarType = CarType.Sedan; |
||||
|
Country = "RU"; |
||||
|
NeighborCountries = new List<string>() { "UK", "CA" }; |
||||
|
} |
||||
|
} |
||||
|
</textarea> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<abp-component-demo-section title="Detailed Form" view-path="@DynamicFormsDemoViewComponent.ViewPath"> |
||||
|
<abp-dynamic-form abp-model="@Model.MyDetailedModel" submit-button="true" /> |
||||
|
</abp-component-demo-section> |
||||
|
|
||||
|
<div class="row"> |
||||
|
<div class="col-md-12"> |
||||
|
<h3>The form model is:</h3> |
||||
|
<hr /> |
||||
|
<textarea style="width:100%;height: 320px" disabled> |
||||
|
public class OrderExampleModel |
||||
|
{ |
||||
|
[DisplayOrder(10005)] |
||||
|
public string Surname { get; set; } |
||||
|
|
||||
|
//Default 10000 |
||||
|
public string EmailAddress { get; set; } |
||||
|
|
||||
|
[DisplayOrder(10003)] |
||||
|
public string Name { get; set; } |
||||
|
|
||||
|
[DisplayOrder(9999)] |
||||
|
public string City { get; set; } |
||||
|
} |
||||
|
</textarea> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<abp-component-demo-section title="Order Attribute Example" view-path="@DynamicFormsDemoViewComponent.ViewPath"> |
||||
|
<abp-dynamic-form abp-model="@Model.MyOrderExampleModel"/> |
||||
|
</abp-component-demo-section> |
||||
|
|
||||
|
<div class="row"> |
||||
|
<div class="col-md-12"> |
||||
|
<h3>The form model is:</h3> |
||||
|
<hr /> |
||||
|
<textarea style="width:100%;height: 320px" disabled> |
||||
|
public class AttributeExamplesModel |
||||
|
{ |
||||
|
[HiddenInput] |
||||
|
public string HiddenInput { get; set; } |
||||
|
|
||||
|
[DisabledInput] |
||||
|
public string DisabledInput { get; set; } |
||||
|
|
||||
|
[ReadOnlyInput] |
||||
|
public string ReadonlyInput { get; set; } |
||||
|
|
||||
|
[FormControlSize(AbpFormControlSize.Large)] |
||||
|
public string LargeInput { get; set; } |
||||
|
|
||||
|
[FormControlSize(AbpFormControlSize.Small)] |
||||
|
public string SmallInput { get; set; } |
||||
|
} |
||||
|
</textarea> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<abp-component-demo-section title="Attribute Examples" view-path="@DynamicFormsDemoViewComponent.ViewPath"> |
||||
|
<abp-dynamic-form abp-model="@Model.MyAttributeExamplesModel" /> |
||||
|
</abp-component-demo-section> |
||||
|
|
||||
|
<abp-component-demo-section title="Form Content Placement" view-path="@DynamicFormsDemoViewComponent.ViewPath"> |
||||
|
<div style="color:red"> |
||||
|
First Div! <br /> |
||||
|
--------- |
||||
|
</div> |
||||
|
|
||||
|
<abp-dynamic-form abp-model="@Model.MyAttributeExamplesModel" /> |
||||
|
|
||||
|
<div style="color:blue"> |
||||
|
--------- <br /> |
||||
|
Second Div! |
||||
|
</div> |
||||
|
</abp-component-demo-section> |
||||
@ -0,0 +1,139 @@ |
|||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.AspNetCore.Mvc.Rendering; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form; |
||||
|
|
||||
|
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.Shared.Demos.DynamicFormsDemo |
||||
|
{ |
||||
|
public class DynamicFormsDemoModel |
||||
|
{ |
||||
|
public List<SelectListItem> CountryList { get; set; } = new List<SelectListItem> |
||||
|
{ |
||||
|
new SelectListItem { Value = "CA", Text = "Canada"}, |
||||
|
new SelectListItem { Value = "US", Text = "USA"}, |
||||
|
new SelectListItem { Value = "UK", Text = "United Kingdom"}, |
||||
|
new SelectListItem { Value = "RU", Text = "Russia"} |
||||
|
}; |
||||
|
|
||||
|
public enum CarType |
||||
|
{ |
||||
|
Sedan, |
||||
|
Hatchback, |
||||
|
StationWagon, |
||||
|
Coupe |
||||
|
} |
||||
|
|
||||
|
public class DetailedModel |
||||
|
{ |
||||
|
[Required] |
||||
|
[Placeholder("Enter your name...")] |
||||
|
[Display(Name = "Name")] |
||||
|
public string Name { get; set; } |
||||
|
|
||||
|
[TextArea(Rows = 4)] |
||||
|
[Display(Name = "Description")] |
||||
|
[InputInfoText("Describe Yourself")] |
||||
|
public string Description { get; set; } |
||||
|
|
||||
|
[Required] |
||||
|
[DataType(DataType.Password)] |
||||
|
[Display(Name = "Password")] |
||||
|
public string Password { get; set; } |
||||
|
|
||||
|
[Display(Name = "Is Active")] |
||||
|
public bool IsActive { get; set; } |
||||
|
|
||||
|
[Required] |
||||
|
[Display(Name = "Age")] |
||||
|
public int Age { get; set; } |
||||
|
|
||||
|
[Required] |
||||
|
[Display(Name = "My Car Type")] |
||||
|
public CarType MyCarType { get; set; } |
||||
|
|
||||
|
[Required] |
||||
|
[AbpRadioButton(Inline = true)] |
||||
|
[Display(Name = "Your Car Type")] |
||||
|
public CarType YourCarType { get; set; } |
||||
|
|
||||
|
[DataType(DataType.Date)] |
||||
|
[Display(Name = "Day")] |
||||
|
public DateTime Day { get; set; } |
||||
|
|
||||
|
[SelectItems(nameof(CountryList))] |
||||
|
[Display(Name = "Country")] |
||||
|
public string Country { get; set; } |
||||
|
|
||||
|
[SelectItems(nameof(CountryList))] |
||||
|
[Display(Name = "Neighbor Countries")] |
||||
|
public List<string> NeighborCountries { get; set; } |
||||
|
|
||||
|
public DetailedModel() |
||||
|
{ |
||||
|
Name = ""; |
||||
|
Description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."; |
||||
|
IsActive = true; |
||||
|
Age = 65; |
||||
|
Day = DateTime.Now; |
||||
|
MyCarType = CarType.Coupe; |
||||
|
YourCarType = CarType.Sedan; |
||||
|
Country = "RU"; |
||||
|
NeighborCountries = new List<string>() { "UK", "CA" }; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public class OrderExampleModel |
||||
|
{ |
||||
|
[DisplayOrder(10005)] |
||||
|
public string Surname { get; set; } |
||||
|
|
||||
|
//Default 10000
|
||||
|
public string EmailAddress { get; set; } |
||||
|
|
||||
|
[DisplayOrder(10003)] |
||||
|
public string Name { get; set; } |
||||
|
|
||||
|
[DisplayOrder(9999)] |
||||
|
public string City { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class AttributeExamplesModel |
||||
|
{ |
||||
|
[HiddenInput] |
||||
|
public string HiddenInput { get; set; } |
||||
|
|
||||
|
[DisabledInput] |
||||
|
public string DisabledInput { get; set; } |
||||
|
|
||||
|
[ReadOnlyInput] |
||||
|
public string ReadonlyInput { get; set; } |
||||
|
|
||||
|
[FormControlSize(AbpFormControlSize.Large)] |
||||
|
public string LargeInput { get; set; } |
||||
|
|
||||
|
[FormControlSize(AbpFormControlSize.Small)] |
||||
|
public string SmallInput { get; set; } |
||||
|
} |
||||
|
|
||||
|
public DetailedModel MyDetailedModel { get; set; } |
||||
|
|
||||
|
public OrderExampleModel MyOrderExampleModel { get; set; } |
||||
|
|
||||
|
public AttributeExamplesModel MyAttributeExamplesModel { get; set; } |
||||
|
|
||||
|
public DynamicFormsDemoModel() |
||||
|
{ |
||||
|
MyDetailedModel = new DetailedModel(); |
||||
|
|
||||
|
MyOrderExampleModel = new OrderExampleModel(); |
||||
|
|
||||
|
MyAttributeExamplesModel = new AttributeExamplesModel(); |
||||
|
MyAttributeExamplesModel.DisabledInput = "Disabled Input"; |
||||
|
MyAttributeExamplesModel.ReadonlyInput = "Readonly Input"; |
||||
|
MyAttributeExamplesModel.LargeInput = "Large Input"; |
||||
|
MyAttributeExamplesModel.SmallInput = "Small Input"; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,18 @@ |
|||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Volo.Abp.AspNetCore.Mvc.UI.Widgets; |
||||
|
|
||||
|
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.Shared.Demos.DynamicFormsDemo |
||||
|
{ |
||||
|
[Widget] |
||||
|
public class DynamicFormsDemoViewComponent : AbpViewComponent |
||||
|
{ |
||||
|
public const string ViewPath = "/Views/Components/Themes/Shared/Demos/DynamicForms/Default.cshtml"; |
||||
|
|
||||
|
public IViewComponentResult Invoke() |
||||
|
{ |
||||
|
var model = new DynamicFormsDemoModel(); |
||||
|
|
||||
|
return View(ViewPath, model); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,124 @@ |
|||||
|
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.Shared.Demos.FormElementsDemo |
||||
|
@model FormElementsDemoModel |
||||
|
|
||||
|
<div class="row"> |
||||
|
<div class="col-md-12"> |
||||
|
<h3>The form model is:</h3> |
||||
|
<hr /> |
||||
|
<textarea style="width:100%;height: 320px" disabled> |
||||
|
public class FormElementsDemoModel |
||||
|
{ |
||||
|
public enum CarType |
||||
|
{ |
||||
|
Sedan, |
||||
|
Hatchback, |
||||
|
StationWagon, |
||||
|
Coupe |
||||
|
} |
||||
|
|
||||
|
public List<SelectListItem> CityList { get; set; } = new List<SelectListItem> |
||||
|
{ |
||||
|
new SelectListItem { Value = "NY", Text = "New York"}, |
||||
|
new SelectListItem { Value = "LDN", Text = "London"}, |
||||
|
new SelectListItem { Value = "IST", Text = "Istanbul"}, |
||||
|
new SelectListItem { Value = "MOS", Text = "Moscow"} |
||||
|
}; |
||||
|
|
||||
|
public class InformMeModel |
||||
|
{ |
||||
|
[Required] |
||||
|
public string Name { get; set; } |
||||
|
|
||||
|
[Required] |
||||
|
[DataType(DataType.Password)] |
||||
|
public string Password { get; set; } |
||||
|
|
||||
|
public bool CheckMeOut { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class DetailsModel |
||||
|
{ |
||||
|
[Required] |
||||
|
public string EmailAddress { get; set; } |
||||
|
|
||||
|
public string City { get; set; } |
||||
|
|
||||
|
public List<string> Cities { get; set; } |
||||
|
|
||||
|
[TextArea] |
||||
|
public string Description { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class CheckboxModel |
||||
|
{ |
||||
|
public bool DefaultCheckbox { get; set; } |
||||
|
|
||||
|
public bool DisabledCheckbox { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class CityRadioModel |
||||
|
{ |
||||
|
[Display(Name = "City")] |
||||
|
public string CityRadio { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class EnumModel |
||||
|
{ |
||||
|
public CarType CarType { get; set; } |
||||
|
} |
||||
|
|
||||
|
public InformMeModel MyInformMeModel { get; set; } |
||||
|
public DetailsModel MyDetailsModel { get; set; } |
||||
|
public CheckboxModel MyCheckboxModel { get; set; } |
||||
|
public CityRadioModel MyCityRadioModel { get; set; } |
||||
|
public EnumModel MyEnumModel { get; set; } |
||||
|
|
||||
|
|
||||
|
public FormElementsDemoModel() |
||||
|
{ |
||||
|
MyInformMeModel = new InformMeModel(); |
||||
|
MyDetailsModel = new DetailsModel(); |
||||
|
MyCheckboxModel = new CheckboxModel(); |
||||
|
MyCityRadioModel = new CityRadioModel() { CityRadio = "IST" }; |
||||
|
MyEnumModel = new EnumModel(); |
||||
|
} |
||||
|
} |
||||
|
</textarea> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<abp-component-demo-section title="Example" view-path="@FormElementsDemoViewComponent.ViewPath"> |
||||
|
<abp-input asp-for="@Model.MyInformMeModel.Name" label="Name" /> |
||||
|
<abp-input asp-for="@Model.MyInformMeModel.Password" label="Password" /> |
||||
|
<abp-input asp-for="@Model.MyInformMeModel.CheckMeOut" label="Check Me Out" /> |
||||
|
</abp-component-demo-section> |
||||
|
|
||||
|
<abp-component-demo-section title="Form controls" view-path="@FormElementsDemoViewComponent.ViewPath"> |
||||
|
<abp-input asp-for="@Model.MyDetailsModel.EmailAddress" label="Email Address" placeholder="name@example.com" /> |
||||
|
<abp-select asp-for="@Model.MyDetailsModel.City" asp-items="@Model.CityList" label="City" /> |
||||
|
<abp-select asp-for="@Model.MyDetailsModel.Cities" asp-items="@Model.CityList" label="Cities" /> |
||||
|
<abp-input asp-for="@Model.MyDetailsModel.Description" label="Description" /> |
||||
|
</abp-component-demo-section> |
||||
|
|
||||
|
<abp-component-demo-section title="Sizing" view-path="@FormElementsDemoViewComponent.ViewPath"> |
||||
|
<abp-input asp-for="@Model.MyInformMeModel.Name" size="Large" /> |
||||
|
<abp-input asp-for="@Model.MyInformMeModel.Name" size="Small" /> |
||||
|
</abp-component-demo-section> |
||||
|
|
||||
|
<abp-component-demo-section title="Disabled And ReadOnly" view-path="@FormElementsDemoViewComponent.ViewPath"> |
||||
|
<abp-input asp-for="@Model.MyInformMeModel.Name" disabled="true" /> |
||||
|
<abp-input asp-for="@Model.MyInformMeModel.Name" readonly="true" /> |
||||
|
</abp-component-demo-section> |
||||
|
|
||||
|
<abp-component-demo-section title="Checkboxes" view-path="@FormElementsDemoViewComponent.ViewPath"> |
||||
|
<abp-input asp-for="@Model.MyCheckboxModel.DefaultCheckbox" /> |
||||
|
<abp-input asp-for="@Model.MyCheckboxModel.DisabledCheckbox" disabled="true" /> |
||||
|
</abp-component-demo-section> |
||||
|
|
||||
|
<abp-component-demo-section title="Radios" view-path="@FormElementsDemoViewComponent.ViewPath"> |
||||
|
<abp-radio asp-for="@Model.MyCityRadioModel.CityRadio" asp-items="@Model.CityList" inline="true" /> |
||||
|
</abp-component-demo-section> |
||||
|
|
||||
|
<abp-component-demo-section title="Enum" view-path="@FormElementsDemoViewComponent.ViewPath"> |
||||
|
<abp-select asp-for="@Model.MyEnumModel.CarType" /> |
||||
|
</abp-component-demo-section> |
||||
@ -0,0 +1,85 @@ |
|||||
|
using Microsoft.AspNetCore.Mvc.Rendering; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form; |
||||
|
|
||||
|
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.Shared.Demos.FormElementsDemo |
||||
|
{ |
||||
|
public class FormElementsDemoModel |
||||
|
{ |
||||
|
public enum CarType |
||||
|
{ |
||||
|
Sedan, |
||||
|
Hatchback, |
||||
|
StationWagon, |
||||
|
Coupe |
||||
|
} |
||||
|
|
||||
|
public List<SelectListItem> CityList { get; set; } = new List<SelectListItem> |
||||
|
{ |
||||
|
new SelectListItem { Value = "NY", Text = "New York"}, |
||||
|
new SelectListItem { Value = "LDN", Text = "London"}, |
||||
|
new SelectListItem { Value = "IST", Text = "Istanbul"}, |
||||
|
new SelectListItem { Value = "MOS", Text = "Moscow"} |
||||
|
}; |
||||
|
|
||||
|
public class InformMeModel |
||||
|
{ |
||||
|
[Required] |
||||
|
public string Name { get; set; } |
||||
|
|
||||
|
[Required] |
||||
|
[DataType(DataType.Password)] |
||||
|
public string Password { get; set; } |
||||
|
|
||||
|
public bool CheckMeOut { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class DetailsModel |
||||
|
{ |
||||
|
[Required] |
||||
|
public string EmailAddress { get; set; } |
||||
|
|
||||
|
public string City { get; set; } |
||||
|
|
||||
|
public List<string> Cities { get; set; } |
||||
|
|
||||
|
[TextArea] |
||||
|
public string Description { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class CheckboxModel |
||||
|
{ |
||||
|
public bool DefaultCheckbox { get; set; } |
||||
|
|
||||
|
public bool DisabledCheckbox { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class CityRadioModel |
||||
|
{ |
||||
|
[Display(Name = "City")] |
||||
|
public string CityRadio { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class EnumModel |
||||
|
{ |
||||
|
public CarType CarType { get; set; } |
||||
|
} |
||||
|
|
||||
|
public InformMeModel MyInformMeModel { get; set; } |
||||
|
public DetailsModel MyDetailsModel { get; set; } |
||||
|
public CheckboxModel MyCheckboxModel { get; set; } |
||||
|
public CityRadioModel MyCityRadioModel { get; set; } |
||||
|
public EnumModel MyEnumModel { get; set; } |
||||
|
|
||||
|
|
||||
|
public FormElementsDemoModel() |
||||
|
{ |
||||
|
MyInformMeModel = new InformMeModel(); |
||||
|
MyDetailsModel = new DetailsModel(); |
||||
|
MyCheckboxModel = new CheckboxModel(); |
||||
|
MyCityRadioModel = new CityRadioModel() { CityRadio = "IST" }; |
||||
|
MyEnumModel = new EnumModel(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,18 @@ |
|||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Volo.Abp.AspNetCore.Mvc.UI.Widgets; |
||||
|
|
||||
|
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.Shared.Demos.FormElementsDemo |
||||
|
{ |
||||
|
[Widget] |
||||
|
public class FormElementsDemoViewComponent : AbpViewComponent |
||||
|
{ |
||||
|
public const string ViewPath = "/Views/Components/Themes/Shared/Demos/FormElements/Default.cshtml"; |
||||
|
|
||||
|
public IViewComponentResult Invoke() |
||||
|
{ |
||||
|
var model = new FormElementsDemoModel(); |
||||
|
|
||||
|
return View(ViewPath, model); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,6 @@ |
|||||
|
@page |
||||
|
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.Shared.Demos.DynamicFormsDemo |
||||
|
@model Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.DynamicForms.IndexModel |
||||
|
<h2>Dynamic Forms</h2> |
||||
|
|
||||
|
@await Component.InvokeAsync(typeof(DynamicFormsDemoViewComponent)) |
||||
@ -0,0 +1,17 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.AspNetCore.Mvc.RazorPages; |
||||
|
|
||||
|
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.DynamicForms |
||||
|
{ |
||||
|
public class IndexModel : PageModel |
||||
|
{ |
||||
|
public void OnGet() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,6 @@ |
|||||
|
@page |
||||
|
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.Shared.Demos.FormElementsDemo |
||||
|
@model Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.FormElements.IndexModel |
||||
|
<h2>Form Elements</h2> |
||||
|
|
||||
|
@await Component.InvokeAsync(typeof(FormElementsDemoViewComponent)) |
||||
@ -0,0 +1,17 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.AspNetCore.Mvc.RazorPages; |
||||
|
|
||||
|
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.Pages.Components.FormElements |
||||
|
{ |
||||
|
public class IndexModel : PageModel |
||||
|
{ |
||||
|
public void OnGet() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue