opt:when subview is reused, transfer its property totally
This commit is contained in:
8
doric-web/dist/index.js
vendored
8
doric-web/dist/index.js
vendored
@@ -2061,6 +2061,14 @@ class Superview extends View {
|
||||
const subviews = [];
|
||||
for (let v of this.allSubviews()) {
|
||||
if (v != undefined) {
|
||||
if (v.superview && v.superview !== this) {
|
||||
//It had been added to another view, need to be marked totally
|
||||
for (let key in v) {
|
||||
if (Reflect.getMetadata(key, v) === PROP_CONSIST || Reflect.getMetadata(key, v) === PROP_INCONSIST) {
|
||||
v.onPropertyChanged(key, undefined, Reflect.get(v, key));
|
||||
}
|
||||
}
|
||||
}
|
||||
v.superview = this;
|
||||
if (v.isDirty()) {
|
||||
subviews.push(v.toModel());
|
||||
|
2
doric-web/dist/index.js.map
vendored
2
doric-web/dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user