Commit cab02632 authored by Chen Jiping's avatar Chen Jiping

解决单选 按钮无法选中问题

parent ee2bed6e
import {Component, EventEmitter, Input, OnDestroy, OnChanges, OnInit, Output, ApplicationRef} from '@angular/core'; import {Component, EventEmitter, Input, OnDestroy, OnChanges, OnInit, Output, ApplicationRef, ChangeDetectorRef} from '@angular/core';
...@@ -15,7 +15,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -15,7 +15,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
item; item;
constructor(private appRef: ApplicationRef) { constructor(private appRef: ApplicationRef, public changeDetectorRef: ChangeDetectorRef) {
} }
...@@ -40,6 +40,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -40,6 +40,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
console.log('data', this.item); console.log('data', this.item);
this.init(); this.init();
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh(); this.refresh();
}, this.saveKey); }, this.saveKey);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment