Browse Source

无JIRA 添加BI.execWithContext

es6
zsmj 2 years ago
parent
commit
91a795f55f
  1. 10
      src/core/4.widget.js

10
src/core/4.widget.js

@ -927,6 +927,16 @@
return vm;
};
BI.execWithContext = function (_context, fn) {
BI.Widget.pushContext(_context);
try {
fn();
} catch (e) {
// nothing
}
BI.Widget.popContext();
};
BI.watch = function (vm, watch, handler) {
// 必须要保证组件当前环境存在
if (BI.Widget.current) {

Loading…
Cancel
Save