2 changed files with 24 additions and 7 deletions
@ -1,13 +1,25 @@ |
|||||
using Microsoft.AspNetCore.Mvc; |
using Microsoft.AspNetCore.Mvc; |
||||
using Volo.Abp.AspNetCore.Mvc; |
using Volo.Abp.AspNetCore.Mvc; |
||||
|
|
||||
namespace EShopOnAbp.PublicWeb.Components.Toolbar.Footer |
namespace EShopOnAbp.PublicWeb.Components.Toolbar.Footer; |
||||
|
|
||||
|
public class FooterComponent : AbpViewComponent |
||||
{ |
{ |
||||
public class FooterComponent : AbpViewComponent |
private readonly FooterModel _model = new(); |
||||
|
|
||||
|
public FooterComponent() |
||||
{ |
{ |
||||
public virtual IViewComponentResult Invoke() |
System.Diagnostics.FileVersionInfo fvi = System.Diagnostics.FileVersionInfo.GetVersionInfo(typeof(AbpViewComponent).Assembly.Location); |
||||
{ |
_model.AbpVersion = fvi.FileVersion; |
||||
return View("~/Components/Toolbar/Footer/Default.cshtml"); |
} |
||||
} |
|
||||
|
public virtual IViewComponentResult Invoke() |
||||
|
{ |
||||
|
return View("~/Components/Toolbar/Footer/Default.cshtml", _model); |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
|
public class FooterModel |
||||
|
{ |
||||
|
public string AbpVersion { get; set; } |
||||
|
} |
||||
Loading…
Reference in new issue