Web/!/auto-generate/common/tmpl.js

(完整代码) 569B

$.fn.tmpl = function (data, eachrow, eachvalue) {
    if (this.length == 0) return;
    var d = data instanceof Array ? data : [data];
    var ret = [];
    for (var i = 0; i < data.length; i++) {
        if (eachrow) {
            if (eachrow(data[i])) continue;
        }
        ret.push($(this.html().replace(/\{(\w+)\}/g, function (value, key, strindex, text) {
            eachvalue && eachvalue(key, value);
            return data[i][key];
        }).replace(/^\s+/, '').replace(/\s+$/, '').replace(/\>\s+\</g, '><')));
    }
    return ret;
};

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。