Browse Source

context重构

es6
guy 4 years ago
parent
commit
0cb402040f
  1. 6
      dist/fix/fix.compact.ie.js
  2. 6
      dist/fix/fix.compact.js
  3. 8
      src/core/widget.js

6
dist/fix/fix.compact.ie.js vendored

@ -33,8 +33,10 @@
} }
function popTarget () { function popTarget () {
targetStack.pop(); Fix.Model.target = target = targetStack.pop();
Fix.Model.target = target = null; if (targetStack.length <= 0) {
BI.Widget.target = target = null;
}
} }
var oldWatch = Fix.watch; var oldWatch = Fix.watch;

6
dist/fix/fix.compact.js vendored

@ -33,8 +33,10 @@
} }
function popTarget () { function popTarget () {
targetStack.pop(); Fix.Model.target = target = targetStack.pop();
Fix.Model.target = target = null; if (targetStack.length <= 0) {
BI.Widget.target = target = null;
}
} }
var oldWatch = Fix.watch; var oldWatch = Fix.watch;

8
src/core/widget.js

@ -517,8 +517,10 @@
}; };
BI.Widget.popContext = function () { BI.Widget.popContext = function () {
contextStack.pop(); BI.Widget.context = context = contextStack.pop();
if (contextStack.length <= 0) {
BI.Widget.context = context = null; BI.Widget.context = context = null;
}
}; };
function pushTarget (_current) { function pushTarget (_current) {
@ -527,9 +529,11 @@
} }
function popTarget () { function popTarget () {
currentStack.pop(); BI.Widget.current = current = currentStack.pop();
if (currentStack.length <= 0) {
BI.Widget.current = current = null; BI.Widget.current = current = null;
} }
}
BI.onBeforeMount = function (beforeMount) { BI.onBeforeMount = function (beforeMount) {
if (current) { if (current) {

Loading…
Cancel
Save