Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cc_mz_003
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
cc_mz_003
Commits
82c22ffd
Commit
82c22ffd
authored
Dec 08, 2020
by
Li MingZhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改背景色
parent
1f9f265c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
form.zip
form/publish/form.zip
+0
-0
form.component.html
form/src/app/form/form.component.html
+7
-0
form.component.ts
form/src/app/form/form.component.ts
+17
-0
No files found.
form/publish/form.zip
View file @
82c22ffd
No preview for this file type
form/src/app/form/form.component.html
View file @
82c22ffd
...
@@ -14,6 +14,13 @@
...
@@ -14,6 +14,13 @@
</app-custom-hot-zone>
</app-custom-hot-zone>
<div
style=
"display: flex; align-items: center; margin-top: 20px;"
>
<h4>
背景色选择:
</h4>
<nz-select
[
ngModel
]="
item
.
bgColorId
"
style=
"width: 120px; margin-left: 20px;"
(
ngModelChange
)="
saveBgColor
($
event
)"
>
<nz-option
*
ngFor=
"let c of bgColorArr; let i = index"
[
nzValue
]="
i
"
[
nzLabel
]="
c
.
text
"
></nz-option>
</nz-select>
</div>
<div
style=
"margin-top: 30px;"
>
<div
style=
"margin-top: 30px;"
>
...
...
form/src/app/form/form.component.ts
View file @
82c22ffd
...
@@ -21,6 +21,14 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -21,6 +21,14 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
picArr
;
picArr
;
bgColorArr
=
[
{
color
:
'
#f9bd03
'
,
text
:
'
橙色
'
},
{
color
:
'
#0000ff
'
,
text
:
'
蓝色
'
},
{
color
:
'
#00ff00
'
,
text
:
'
绿色
'
},
];
bgColor
;
customTypeGroupArr
=
[
customTypeGroupArr
=
[
{
{
...
@@ -59,6 +67,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -59,6 +67,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this
.
changeDetectorRef
.
detectChanges
();
this
.
changeDetectorRef
.
detectChanges
();
this
.
refresh
();
this
.
refresh
();
console
.
log
(
'
data:
'
,
data
);
},
this
.
saveKey
);
},
this
.
saveKey
);
}
}
...
@@ -165,6 +175,13 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -165,6 +175,13 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this
.
save
();
this
.
save
();
}
}
saveBgColor
(
i
)
{
console
.
log
(
'
in saveBgClor:
'
,
this
.
bgColor
);
this
.
item
.
bgColorId
=
i
;
this
.
item
.
bgColor
=
this
.
bgColorArr
[
i
].
color
;
this
.
save
();
}
/**
/**
* 储存数据
* 储存数据
...
...
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