Browse Source

Merge pull request #270009 in DEC/fineui from release/11.0 to bugfix/11.0

* commit 'ea8c70402f4ec7a8c6e0537cf398de45b430556b':
  REPORT-114436 fix: 同步Dep回收优化到release
master^2^2
superman 9 months ago
parent
commit
42deeb4a67
  1. 1
      packages/fineui/src/fix/fix.compact.js
  2. 10
      packages/fineui/src/fix/fix.js

1
packages/fineui/src/fix/fix.compact.js

@ -204,6 +204,7 @@ Widget.prototype.__destroy = function() {
unwatch(); unwatch();
}); });
}); });
Fix.cleanupDeps();
this._watchers && (this._watchers = []); this._watchers && (this._watchers = []);
if (this.store) { if (this.store) {
this.store._parent && (this.store._parent = null); this.store._parent && (this.store._parent = null);

10
packages/fineui/src/fix/fix.js

@ -110,7 +110,15 @@ function isExtensible(obj) {
function remove(arr, item) { function remove(arr, item) {
if (arr && arr.length) { if (!arr) {
return;
}
const len = arr.length;
if (len) {
if (item === arr[len - 1]) {
arr.length = len - 1;
return;
}
const index = arr.indexOf(item); const index = arr.indexOf(item);
if (index > -1) { if (index > -1) {
return arr.splice(index, 1); return arr.splice(index, 1);

Loading…
Cancel
Save