Skip to content

Commit

Permalink
一大波调整正在靠近。。。
Browse files Browse the repository at this point in the history
重写OutXml输出(自动赋值过滤掉隐藏input等)
  • Loading branch information
cyq1162 committed Aug 2, 2016
1 parent b7ea2fc commit 7ff8bef
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions Xml/XHtmlAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ public void Set(string idOrName, string value)
throw;
}


}
}

Expand Down Expand Up @@ -777,22 +777,19 @@ public override string OutXml
MatchCollection matchs = Regex.Matches(html, @"\$\{([\S\s]*?)\}", RegexOptions.Compiled | RegexOptions.IgnoreCase);
if (matchs != null && matchs.Count > 0)
{
MDataCell matchCell = null;
string[] items = null;
string columnName = null, value = null; ;
List<string> keys = new List<string>(matchs.Count);
foreach (Match match in matchs)
{
value = match.Groups[0].Value;
string value = match.Groups[0].Value;
if (!keys.Contains(value))
{
keys.Add(value);
items = match.Groups[1].Value.Trim().Split('#', '-');
string[] items = match.Groups[1].Value.Trim().Split('#', '-');
string pre = items.Length > 1 ? items[0] : "";
columnName = items.Length > 1 ? items[1] : items[0];
string columnName = items.Length > 1 ? items[1] : items[0];
if (dicForAutoSetValue.ContainsKey(pre))
{
matchCell = dicForAutoSetValue[pre][columnName];
MDataCell matchCell = dicForAutoSetValue[pre][columnName];
if (matchCell != null)
{
html = html.Replace(value, matchCell.ToString());
Expand Down

0 comments on commit 7ff8bef

Please sign in to comment.