mirror of https://github.com/abpframework/abp.git
3 changed files with 51 additions and 0 deletions
@ -0,0 +1,34 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Pages.Shared.Components.AbpPageSearchBox |
|||
{ |
|||
public class AbpPageSearchBoxViewComponent : AbpViewComponent |
|||
{ |
|||
public string PlaceHolder { get; set; } |
|||
|
|||
public async Task<IViewComponentResult> InvokeAsync( |
|||
string placeHolder, |
|||
string formClassName, |
|||
string textBoxClassName) |
|||
{ |
|||
return await Task.FromResult(View("~/Pages/Shared/Components/AbpPageSearchBox/Default.cshtml", |
|||
new SearchBoxViewModel |
|||
{ |
|||
PlaceHolder = placeHolder, |
|||
FormClassName = formClassName, |
|||
TextBoxClassName = textBoxClassName |
|||
})); |
|||
; |
|||
} |
|||
} |
|||
|
|||
public class SearchBoxViewModel |
|||
{ |
|||
public string PlaceHolder { get; set; } |
|||
|
|||
public string FormClassName { get; set; } |
|||
|
|||
public string TextBoxClassName { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
@model Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Pages.Shared.Components.AbpPageSearchBox.SearchBoxViewModel |
|||
|
|||
|
|||
<form method="post" class="@Model.FormClassName"> |
|||
<div class="input-group"> |
|||
<input class="form-control @Model.TextBoxClassName" placeholder="@Model.PlaceHolder"/> |
|||
<div class="input-group-append"> |
|||
<abp-button button-type="Primary" type="submit"> |
|||
<i class="fa fa-search" aria-hidden="true"></i> |
|||
</abp-button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
Loading…
Reference in new issue