Skip to content

Commit

Permalink
Decimal类型,标记ItemType为money时,才使用货币符号作为表单项前缀
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Dec 8, 2023
1 parent 45f9b41 commit 40d983b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion NewLife.CubeNC/Views/Shared/_Form_Decimal.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
var atts = HtmlHelper.AnonymousObjectToHtmlAttributes(Model.HtmlAttributes);
if (!atts.ContainsKey("class")) atts.Add("class", "form-control");
}
<span class="input-group-addon"><i class="glyphicon glyphicon-yen"></i></span>
@if (Model.ItemType.EqualIgnoreCase("Money"))
{
<span class="input-group-addon"><i class="glyphicon glyphicon-yen"></i></span>
}
@Html.TextBox(name, value, Model.Format, atts)

0 comments on commit 40d983b

Please sign in to comment.