This commit is contained in:
2025-12-29 12:30:46 +08:00
parent e198ab93ed
commit e131d93c6e
4 changed files with 70 additions and 9 deletions

View File

@@ -1,5 +1,7 @@
@page "/area/list/{countryId:long}"
@page "/area/list/{countryId:long}/{stateProvinceId:long}"
@page "/{locale}/area/list/{countryId:long}"
@page "/{locale}/area/list/{countryId:long}/{stateProvinceId:long}"
@inject ILogger<CountryList> Logger
@attribute [Authorize]
@@ -92,6 +94,8 @@
public string Locale { get; set; } = string.Empty;
[Parameter]
public long CountryId { get; set; }
[Parameter]
public long StateProvinceId { get; set; }
[SupplyParameterFromQuery]
int? Page { get; set; }
@@ -202,7 +206,15 @@
void HandleAddNew()
{
Navigation.NavigateTo($"/area/create/{CountryId}");
if (StateProvinceId > 0)
{
Navigation.NavigateTo($"/area/create/{CountryId}/{StateProvinceId}");
}
else
{
Navigation.NavigateTo($"/area/create/{CountryId}");
}
}