Browse Source

Merge pull request #9121 from abpframework/lookup-api-output-update

Set lookup property value if url is not null or empty.
pull/9161/head
liangshiwei 5 years ago
committed by GitHub
parent
commit
c04e70e352
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 21
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/CachedObjectExtensionsDtoService.cs

21
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/CachedObjectExtensionsDtoService.cs

@ -141,18 +141,23 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending
OnTable = new ExtensionPropertyUiTableDto
{
IsVisible = propertyConfig.UI.OnTable.IsVisible
},
Lookup = new ExtensionPropertyUiLookupDto
{
Url = propertyConfig.UI.Lookup.Url,
ResultListPropertyName = propertyConfig.UI.Lookup.ResultListPropertyName,
DisplayPropertyName = propertyConfig.UI.Lookup.DisplayPropertyName,
ValuePropertyName = propertyConfig.UI.Lookup.ValuePropertyName,
FilterParamName = propertyConfig.UI.Lookup.FilterParamName
}
}
};
if (!propertyConfig.UI.Lookup.Url.IsNullOrEmpty())
{
extensionPropertyDto.Ui.Lookup = new ExtensionPropertyUiLookupDto
{
Url = propertyConfig.UI.Lookup.Url,
ResultListPropertyName = propertyConfig.UI.Lookup.ResultListPropertyName,
DisplayPropertyName = propertyConfig.UI.Lookup.DisplayPropertyName,
ValuePropertyName = propertyConfig.UI.Lookup.ValuePropertyName,
FilterParamName = propertyConfig.UI.Lookup.FilterParamName
};
}
foreach (var attribute in propertyConfig.Attributes)
{
extensionPropertyDto.Attributes.Add(

Loading…
Cancel
Save