Skip to content

Commit

Permalink
XHtmlAction:taurus.mvc 绑定无数据时默认执行clearflag=0标签事件。
Browse files Browse the repository at this point in the history
  • Loading branch information
cyq1162 committed Jul 29, 2020
1 parent 9c28684 commit b8accd9
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Xml/XHtmlAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,18 @@ public void SetForeach(XmlNode node, string text, params object[] formatValues)
try
{
#region 基本判断
if (node == null || _Table == null || _Table.Rows.Count == 0) { return; }
if (node == null)
{
return;
}
if (_Table == null || _Table.Rows.Count == 0)
{
if (node.Attributes["clearflag"] == null)
{
node.InnerXml = "";
}
return;
}
RemoveAttr(node, "clearflag");
#endregion

Expand Down

0 comments on commit b8accd9

Please sign in to comment.