Skip to content

Commit bb018be

Browse files
committed
refactor(visual-component): add markForCheck method
1 parent 8007b8a commit bb018be

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/visual-component.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ export class VisualComponent {
114114
noData?: boolean;
115115

116116
/** 父组件 */
117-
parent?: VisualComponent;
117+
parent?: VisualComponent | null;
118118

119119
/** 子组件 */
120-
children?: VisualComponent[];
120+
children?: VisualComponent[] | null;
121121

122122
/** 显示 */
123123
show() {
@@ -222,4 +222,9 @@ export class VisualComponent {
222222
detectChanges() {
223223
this.changeDetectorRef.detectChanges();
224224
}
225+
226+
/** 标记变更检测 */
227+
markForCheck() {
228+
this.changeDetectorRef.markForCheck();
229+
}
225230
}

0 commit comments

Comments
 (0)