From 3e6da9cb496d288d7c31550c567682fe2f906ce3 Mon Sep 17 00:00:00 2001 From: Young Date: Fri, 9 Mar 2018 16:14:21 +0800 Subject: [PATCH] contains --- dist/core.js | 2 ++ dist/fineui.js | 2 ++ src/core/base.js | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dist/core.js b/dist/core.js index 825fd93db..2314bdab6 100644 --- a/dist/core.js +++ b/dist/core.js @@ -28304,6 +28304,8 @@ BI.extend(BI.DOM, { } if (!points[type][action]) { points[type][action] = {}; + } + if (!points[type][action][after ? "after" : "before"]) { points[type][action][after ? "after" : "before"] = []; } points[type][action][after ? "after" : "before"].push(pointFn); diff --git a/dist/fineui.js b/dist/fineui.js index 76b7ef348..322815dfd 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -28547,6 +28547,8 @@ BI.extend(BI.DOM, { } if (!points[type][action]) { points[type][action] = {}; + } + if (!points[type][action][after ? "after" : "before"]) { points[type][action][after ? "after" : "before"] = []; } points[type][action][after ? "after" : "before"].push(pointFn); diff --git a/src/core/base.js b/src/core/base.js index a70281b76..cc0139b09 100644 --- a/src/core/base.js +++ b/src/core/base.js @@ -159,7 +159,7 @@ if (!window.BI) { }); // 集合相关方法 - _.each(["where", "findWhere", "contains", "invoke", "pluck", "shuffle", "sample", "toArray", "size"], function (name) { + _.each(["where", "findWhere", "invoke", "pluck", "shuffle", "sample", "toArray", "size"], function (name) { BI[name] = _apply(name); }); _.each(["get", "each", "map", "reduce", "reduceRight", "find", "filter", "reject", "every", "all", "some", "any", "max", "min",