From 937745e64e1f3fc45a34652300cd9f1bf9d539b8 Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 28 Nov 2017 20:04:41 +0800 Subject: [PATCH] update --- dist/fix/fix.compact.js | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/dist/fix/fix.compact.js b/dist/fix/fix.compact.js index d7135365d7..837e51dec5 100644 --- a/dist/fix/fix.compact.js +++ b/dist/fix/fix.compact.js @@ -33,8 +33,15 @@ BI.Widget.prototype._init = function () { var needPop = false; if (window.Fix && this._store) { - if (this.options.element && this.options.element.store) { - pushTarget(this.options.element.store); + var p = this.options.element; + while (p) { + if (p.store) { + break; + } + p = p._parent || (p.options && p.options.element); + } + if (p) { + pushTarget(p.store); needPop = true; } this.store = this._store(); @@ -66,4 +73,18 @@ this._watchers && (this._watchers = []); this.store && (this.store._parent = null, this.store = null); } + + _.each(["each", "map", "reduce", "reduceRight", "find", "filter", "reject", "every", "all", "some", "any", "max", "min", + "sortBy", "groupBy", "indexBy", "countBy", "partition", + "keys", "allKeys", "values", "pairs", "invert", + "mapObject", "findKey", "pick", "omit", "tap"], function (name) { + var old = BI[name] + BI[name] = function (obj, fn) { + return old(obj, function (key, value) { + if (!(key in Fix.$$skipArray)) { + return fn.apply(null, arguments); + } + }); + } + }); }()); \ No newline at end of file