opt: fix proxy handler use target directly

This commit is contained in:
pengfei.zhou 2021-06-03 18:24:02 +08:00 committed by osborn
parent 5a9b55c75b
commit 864ffa0de7
5 changed files with 5 additions and 5 deletions

View File

@ -503,7 +503,7 @@ class Group extends Superview {
set: (target, index, value) => { set: (target, index, value) => {
const ret = Reflect.set(target, index, value); const ret = Reflect.set(target, index, value);
// Let getDirty return true // Let getDirty return true
this.dirtyProps.children = this.children.map(e => e.viewId); this.dirtyProps.children = target.map(e => e.viewId);
return ret; return ret;
} }
}); });

View File

@ -2024,7 +2024,7 @@ class Group extends Superview {
set: (target, index, value) => { set: (target, index, value) => {
const ret = Reflect.set(target, index, value); const ret = Reflect.set(target, index, value);
// Let getDirty return true // Let getDirty return true
this.dirtyProps.children = this.children.map(e => e.viewId); this.dirtyProps.children = target.map(e => e.viewId);
return ret; return ret;
} }
}); });

View File

@ -385,7 +385,7 @@ export class Group extends Superview {
set: (target, index, value) => { set: (target, index, value) => {
const ret = Reflect.set(target, index, value); const ret = Reflect.set(target, index, value);
// Let getDirty return true // Let getDirty return true
this.dirtyProps.children = this.children.map(e => e.viewId); this.dirtyProps.children = target.map(e => e.viewId);
return ret; return ret;
} }
}); });

View File

@ -451,7 +451,7 @@ export abstract class Group extends Superview {
set: (target, index, value) => { set: (target, index, value) => {
const ret = Reflect.set(target, index, value) const ret = Reflect.set(target, index, value)
// Let getDirty return true // Let getDirty return true
this.dirtyProps.children = this.children.map(e => e.viewId) this.dirtyProps.children = (target as View[]).map(e => e.viewId)
return ret return ret
} }
}) })

View File

@ -2078,7 +2078,7 @@ class Group extends Superview {
set: (target, index, value) => { set: (target, index, value) => {
const ret = Reflect.set(target, index, value); const ret = Reflect.set(target, index, value);
// Let getDirty return true // Let getDirty return true
this.dirtyProps.children = this.children.map(e => e.viewId); this.dirtyProps.children = target.map(e => e.viewId);
return ret; return ret;
} }
}); });