Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
PU-17
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
PU-17
Commits
b5c84a8f
Commit
b5c84a8f
authored
Jul 01, 2020
by
Chen Jiping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调试
parent
20cd3065
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
form.component.ts
src/app/form/form.component.ts
+7
-4
No files found.
src/app/form/form.component.ts
View file @
b5c84a8f
...
@@ -26,9 +26,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -26,9 +26,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
ngOnInit
()
{
ngOnInit
()
{
this
.
item
=
new
Course
();
this
.
item
=
new
Course
();
this
.
item
.
type
=
'
01
'
;
this
.
item
.
type
=
'
01
'
;
this
.
item
.
picArr
=
[];
this
.
item
.
colorArr
=
[];
this
.
initColorArr
();
this
.
initColorArr
();
...
@@ -40,12 +41,12 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -40,12 +41,12 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
if
(
data
)
{
if
(
data
)
{
this
.
item
=
data
;
this
.
item
=
data
;
}
}
console
.
log
(
this
.
item
);
//
console.log(this.item);
this
.
init
();
this
.
init
();
this
.
changeDetectorRef
.
markForCheck
();
this
.
changeDetectorRef
.
detectChanges
();
this
.
refresh
();
this
.
refresh
();
this
.
save
();
},
this
.
saveKey
);
},
this
.
saveKey
);
}
}
...
@@ -133,6 +134,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -133,6 +134,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
* 刷新 渲染页面
* 刷新 渲染页面
*/
*/
refresh
()
{
refresh
()
{
this
.
changeDetectorRef
.
markForCheck
();
this
.
changeDetectorRef
.
detectChanges
();
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
appRef
.
tick
();
this
.
appRef
.
tick
();
},
1
);
},
1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment