摘要:
1 (function(){ 2 var cache = {}; 3 4 this.tmpl = function tmpl(str, data){ 5 // Figure out if we're getting a template, or if we need to 6 // load the template - and be sure to cache the result. 7 var fn = !/\W/.test(str) ? 8 cache[str] = cache[str] || t... 阅读全文