@viewfly/core 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/foundation/component.d.ts +1 -1
- package/bundles/index.esm.js +10 -6
- package/bundles/index.js +10 -6
- package/package.json +2 -2
|
@@ -26,7 +26,7 @@ export declare class Component extends ReflectiveInjector implements JSXTypeof<J
|
|
|
26
26
|
protected _dirty: boolean;
|
|
27
27
|
protected _changed: boolean;
|
|
28
28
|
private unWatch?;
|
|
29
|
-
private
|
|
29
|
+
private isFirstRendering;
|
|
30
30
|
private refs;
|
|
31
31
|
constructor(parentComponent: Injector | null, type: JSXInternal.ComponentSetup, props: Props, key?: Key | undefined);
|
|
32
32
|
markAsDirtied(): void;
|
package/bundles/index.esm.js
CHANGED
|
@@ -674,7 +674,7 @@ class Component extends ReflectiveInjector {
|
|
|
674
674
|
this.propsChangedDestroyCallbacks = [];
|
|
675
675
|
this._dirty = true;
|
|
676
676
|
this._changed = true;
|
|
677
|
-
this.
|
|
677
|
+
this.isFirstRendering = true;
|
|
678
678
|
}
|
|
679
679
|
markAsDirtied() {
|
|
680
680
|
this._dirty = true;
|
|
@@ -775,15 +775,19 @@ class Component extends ReflectiveInjector {
|
|
|
775
775
|
}
|
|
776
776
|
rendered() {
|
|
777
777
|
this.changedSubComponents.clear();
|
|
778
|
-
const is = this.
|
|
779
|
-
this.
|
|
778
|
+
const is = this.isFirstRendering;
|
|
779
|
+
this.isFirstRendering = false;
|
|
780
780
|
this._dirty = this._changed = false;
|
|
781
|
+
this.invokeUpdatedHooks();
|
|
781
782
|
if (is) {
|
|
782
|
-
this.invokeUpdatedHooks();
|
|
783
783
|
this.invokeMountHooks();
|
|
784
784
|
}
|
|
785
|
-
|
|
786
|
-
|
|
785
|
+
if (this.changed) {
|
|
786
|
+
Promise.resolve().then(() => {
|
|
787
|
+
if (this.parentComponent instanceof Component) {
|
|
788
|
+
this.parentComponent.markAsChanged(this);
|
|
789
|
+
}
|
|
790
|
+
});
|
|
787
791
|
}
|
|
788
792
|
}
|
|
789
793
|
destroy() {
|
package/bundles/index.js
CHANGED
|
@@ -676,7 +676,7 @@ class Component extends ReflectiveInjector {
|
|
|
676
676
|
this.propsChangedDestroyCallbacks = [];
|
|
677
677
|
this._dirty = true;
|
|
678
678
|
this._changed = true;
|
|
679
|
-
this.
|
|
679
|
+
this.isFirstRendering = true;
|
|
680
680
|
}
|
|
681
681
|
markAsDirtied() {
|
|
682
682
|
this._dirty = true;
|
|
@@ -777,15 +777,19 @@ class Component extends ReflectiveInjector {
|
|
|
777
777
|
}
|
|
778
778
|
rendered() {
|
|
779
779
|
this.changedSubComponents.clear();
|
|
780
|
-
const is = this.
|
|
781
|
-
this.
|
|
780
|
+
const is = this.isFirstRendering;
|
|
781
|
+
this.isFirstRendering = false;
|
|
782
782
|
this._dirty = this._changed = false;
|
|
783
|
+
this.invokeUpdatedHooks();
|
|
783
784
|
if (is) {
|
|
784
|
-
this.invokeUpdatedHooks();
|
|
785
785
|
this.invokeMountHooks();
|
|
786
786
|
}
|
|
787
|
-
|
|
788
|
-
|
|
787
|
+
if (this.changed) {
|
|
788
|
+
Promise.resolve().then(() => {
|
|
789
|
+
if (this.parentComponent instanceof Component) {
|
|
790
|
+
this.parentComponent.markAsChanged(this);
|
|
791
|
+
}
|
|
792
|
+
});
|
|
789
793
|
}
|
|
790
794
|
}
|
|
791
795
|
destroy() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viewfly/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Viewfly is a simple and easy-to-use JavaScript framework with an intuitive development experience.",
|
|
5
5
|
"main": "./bundles/index.js",
|
|
6
6
|
"module": "./bundles/index.esm.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"bugs": {
|
|
48
48
|
"url": "https://github.com/viewfly/viewfly.git/issues"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "7ca289c06cf646dab99157efea91ae9220b2abfd",
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"reflect-metadata": "^0.1.13"
|
|
53
53
|
}
|