|
|
@ -12123,15 +12123,18 @@ _.extend(BI.OB.prototype, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
BI.mount = function (widget, container, predicate, hydrate) { |
|
|
|
BI.mount = function (widget, container, predicate, hydrate) { |
|
|
|
if(hydrate === true){ |
|
|
|
if (hydrate === true) { |
|
|
|
// 将widget的element元素都挂载好,并建立相互关系
|
|
|
|
// 将widget的element元素都挂载好,并建立相互关系
|
|
|
|
var res = widget._mount(true, false, false, function(w){ |
|
|
|
widget.element.data("__widgets", [widget]); |
|
|
|
var ws = w.element.data("__widgets"); |
|
|
|
var res = widget._mount(true, false, false, function (w) { |
|
|
|
if(!ws) { |
|
|
|
BI.each(w._children, function (i, child) { |
|
|
|
ws = []; |
|
|
|
var ws = child.element.data("__widgets"); |
|
|
|
} |
|
|
|
if (!ws) { |
|
|
|
ws.push(w); |
|
|
|
ws = []; |
|
|
|
w.element.data("__widgets", ws); |
|
|
|
} |
|
|
|
|
|
|
|
ws.push(w); |
|
|
|
|
|
|
|
child.element.data("__widgets", ws); |
|
|
|
|
|
|
|
}); |
|
|
|
predicate && predicate.apply(this, arguments); |
|
|
|
predicate && predicate.apply(this, arguments); |
|
|
|
}); |
|
|
|
}); |
|
|
|
// 将新的dom树属性(事件等)patch到已存在的dom上
|
|
|
|
// 将新的dom树属性(事件等)patch到已存在的dom上
|
|
|
@ -12145,7 +12148,7 @@ _.extend(BI.OB.prototype, { |
|
|
|
triggerLifeHook(child); |
|
|
|
triggerLifeHook(child); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}; |
|
|
|
}; |
|
|
|
//最后触发组件树生命周期函数
|
|
|
|
// 最后触发组件树生命周期函数
|
|
|
|
triggerLifeHook(widget); |
|
|
|
triggerLifeHook(widget); |
|
|
|
return res; |
|
|
|
return res; |
|
|
|
} |
|
|
|
} |
|
|
@ -12175,7 +12178,7 @@ _.extend(BI.OB.prototype, { |
|
|
|
|
|
|
|
|
|
|
|
BI.createWidget = function (item, options, context) { |
|
|
|
BI.createWidget = function (item, options, context) { |
|
|
|
// 先把准备环境准备好
|
|
|
|
// 先把准备环境准备好
|
|
|
|
while(BI.prepares && BI.prepares.length > 0) { |
|
|
|
while (BI.prepares && BI.prepares.length > 0) { |
|
|
|
BI.prepares.shift()(); |
|
|
|
BI.prepares.shift()(); |
|
|
|
} |
|
|
|
} |
|
|
|
var el, w; |
|
|
|
var el, w; |
|
|
|