|
|
|
@ -784,6 +784,8 @@
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
BI.watch = function (vm, watch, handler) { |
|
|
|
|
// 必须要保证组件当前环境存在
|
|
|
|
|
if (BI.Widget.current) { |
|
|
|
|
if (vm instanceof BI.Model) { |
|
|
|
|
var watchers = []; |
|
|
|
|
if (BI.isKey(watch)) { |
|
|
|
@ -806,11 +808,10 @@
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// vm中一定有_widget
|
|
|
|
|
vm._widget._watchers || (vm._widget._watchers = []); |
|
|
|
|
vm._widget._watchers = vm._widget._watchers.concat(watchers); |
|
|
|
|
BI.Widget.current._watchers || (BI.Widget.current._watchers = []); |
|
|
|
|
BI.Widget.current._watchers = BI.Widget.current._watchers.concat(watchers); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (BI.Widget.current) { |
|
|
|
|
handler = watch; |
|
|
|
|
watch = vm; |
|
|
|
|
BI.Widget.current.$watchDelayCallbacks || (BI.Widget.current.$watchDelayCallbacks = []); |
|
|
|
|