Browse Source

Pull request #3155: 无JIRA 添加BI.execWithContext

Merge in VISUAL/fineui from ~DAILER/fineui:master to master

* commit '9abfd6c339509069f7dcf2768c121d49d2d139f2':
  无JIRA 添加BI.execWithContext
es6
Dailer-刘荣歆 2 years ago
parent
commit
119dba226c
  1. 10
      src/core/4.widget.js

10
src/core/4.widget.js

@ -927,6 +927,16 @@
return vm; 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) { BI.watch = function (vm, watch, handler) {
// 必须要保证组件当前环境存在 // 必须要保证组件当前环境存在
if (BI.Widget.current) { if (BI.Widget.current) {

Loading…
Cancel
Save