text: /************************************************
  编写：邬畏畏
  blogs:www.cnblogs.com/wsoft
  wui:www.flybirdsoft.com/wui
  *************************************************/
  !function(e){var t={_startSymbol:"\\${",_endSymbol:"}",templateElement:{},contentNode:null};t.startSymbol=function(e){var t,n="",o="^$*+?{}[]|.";for(t=0;t<e.length;t++)o.indexOf(e.substr(t,1))>=0&&(n+="\\"),n+=e.substr(t,1);this._startSymbol=n},t.endSymbol=function(e){var t,n="",o="^$*+?{}[]|.";for(t=0;t<e.length;t++)o.indexOf(e.substr(t,1))>=0&&(n+="\\"),n+=e.substr(t,1);this._endSymbol=e},t.repeat=function(e){if(void 0==e.data)throw new Error("参数名称不对,参数是{},缺少data");if(void 0==e.repeatId&&void 0==e.repeatElement)throw new Error("参数名称不对,参数是{},缺少repeatElement或repeatId");var n,o,r,i,l,a,s,i,d,p,m={string:""},b=[],c=0,g=null,y=null,f=function(){},u={},h=null,v="";for(l=e.repeatElement||$(e.repeatId)[0],a=l.parentNode,(void 0==e.type||void 0!=e.type&&"cover"==e.type)&&t.deleteNode(l),void 0==e.template&&(e.template=l.innerHTML),void 0==e.data.length?(c=1,b[0]=e.data):(c=e.data.length,b=e.data),void 0!=e.count&&e.count<=c&&(c=e.count),void 0!=e.process&&(f=e.process||e.onprocess),g=l,y=a.lastChild,void 0!=e.onloadBefore&&e.onloadBefore.call(this),n=c-1;n>=0;n--){for(r=b[n],u={index:n,item:b[n]},s=f.call(this,u),h=document.createElement(l.nodeName),o=0;o<l.attributes.length;o++){v=l.attributes.item(o).value;for(i in s)d=this._startSymbol+i+this._endSymbol,p=new RegExp(d,"g"),v=v.replace(p,s[i]);for(i in r)d=this._startSymbol+i+this._endSymbol,p=new RegExp(d,"g"),v=v.replace(p,r[i]);h.setAttribute(l.attributes.item(o).name,v)}m.string=e.template;for(i in s)"object"!=typeof s[i]?(d=this._startSymbol+i+this._endSymbol,p=new RegExp(d,"g"),m.string=m.string.replace(p,s[i])):t.getScope(s,i,m);for(i in r)"object"!=typeof r[i]?(d=this._startSymbol+i+this._endSymbol,p=new RegExp(d,"g"),m.string=m.string.replace(p,r[i])):t.getScope(r,i,m);h.innerHTML=m.string,void 0!=e.type&&"append"==e.type?(a.insertBefore(h,y.nextSibling),h.style.display="",h.setAttribute("templateItem","templateItem"),h=y):(a.insertBefore(h,g.nextSibling),h.style.display="",h.setAttribute("templateItem","templateItem"))}l.style.display="none",void 0!=e.onload&&e.onload.call(this),void 0!=e.bind},t.getScope=function(e,t,n,o){var r,i,l="";if(i=e[t],"object"==typeof i){l=void 0==o?t:o;for(r in i){if(l+="."+r,"object"==typeof i[r])return void this.getScope(i,r,n,l);strV=this._startSymbol+l+this._endSymbol,reg=new RegExp(strV,"g"),n.string=n.string.replace(reg,i[r])}}},t.deleteNode=function(e){var t=e.nextSibling;if(null!=t){var n,o;try{o=1==t.nodeType&&"templateItem"==t.getAttribute("templateItem")||1!=t.nodeType}catch(r){return}for(;null!=t&&o;)n=t.nextSibling,t.parentNode.removeChild(t),t=n}},e.T=e.template=t}(window);