guy 2 years ago
parent
commit
7d79192daa
  1. 2
      package.json
  2. 10
      src/core/4.widget.js

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "fineui", "name": "fineui",
"version": "2.0.20221022172437", "version": "2.0.20221022202435",
"description": "fineui", "description": "fineui",
"main": "dist/fineui_without_conflict.min.js", "main": "dist/fineui_without_conflict.min.js",
"types": "dist/lib/index.d.ts", "types": "dist/lib/index.d.ts",

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