From f2e46d3b258ca6773b6be34eed1244396ab73033 Mon Sep 17 00:00:00 2001 From: Aaron Chong Date: Sun, 25 Apr 2021 17:48:41 +0800 Subject: [PATCH] Simplify usage of SetHtmlContent to AppendHtml --- .../TagHelpers/Form/AbpDynamicformTagHelperService.cs | 6 +++--- .../TagHelpers/Form/AbpInputTagHelperService.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpDynamicformTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpDynamicformTagHelperService.cs index c8f18cf677..24c1bd07fe 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpDynamicformTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpDynamicformTagHelperService.cs @@ -78,8 +78,8 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form await formTagOutput.GetChildContentAsync(); - output.PostContent.SetHtmlContent(output.PostContent.GetContent() + formTagOutput.PostContent.GetContent()); - output.PreContent.SetHtmlContent(output.PreContent.GetContent() + formTagOutput.PreContent.GetContent()); + output.PostContent.AppendHtml(formTagOutput.PostContent); + output.PreContent.AppendHtml(formTagOutput.PreContent); } protected virtual void NormalizeTagMode(TagHelperContext context, TagHelperOutput output) @@ -123,7 +123,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form var buttonHtml = await ProcessSubmitButtonAndGetContentAsync(context, output); - output.PostContent.SetHtmlContent(output.PostContent.GetContent() + buttonHtml); + output.PostContent.AppendHtml(buttonHtml); } protected virtual List InitilizeFormGroupContentsContext(TagHelperContext context, TagHelperOutput output) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs index 48abbd93e9..8d49977df0 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs @@ -52,7 +52,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form output.Attributes.AddClass(isCheckBox ? "custom-checkbox" : "form-group"); output.Attributes.AddClass(isCheckBox ? "custom-control" : ""); output.Attributes.AddClass(isCheckBox ? "mb-2" : ""); - output.Content.SetHtmlContent(output.Content.GetContent() + innerHtml); + output.Content.AppendHtml(innerHtml); } }