Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JJ36
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
JJ36
Commits
ee51b6ca
Commit
ee51b6ca
authored
Aug 28, 2024
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
8de8c5be
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
6 deletions
+28
-6
form.component.html
form/src/app/form/form.component.html
+19
-5
form.component.ts
form/src/app/form/form.component.ts
+9
-1
No files found.
form/src/app/form/form.component.html
View file @
ee51b6ca
...
...
@@ -102,6 +102,16 @@
<div
style=
"border: 2px #ccc solid; border-radius: 15px; width: 1000px; margin: 30px"
>
<div
style=
"margin: 30px; display: flex; align-items: center;"
>
<h2
style=
"margin: 10px"
>
干扰项类型:
</h2>
<nz-radio-group
[
ngModel
]="
item
.
wrongType
"
(
ngModelChange
)="
radioChange
($
event
,
item
,
'
wrongType
')"
style=
"display: flex; align-items: center; justify-content: center; flex-wrap: wrap;"
>
<label
nz-radio
nzValue=
"text"
>
文本
</label>
<label
nz-radio
nzValue=
"pic"
>
图片
</label>
</nz-radio-group>
</div>
<div
*
ngFor=
"let wrongData of item.wrongArr; let i = index"
style=
"border: 1px #ccc solid; border-radius: 15px; width: 950px; padding: 30px; margin: 30px;"
>
...
...
@@ -113,17 +123,21 @@
</div>
<div
style=
"border: 1px #ccc solid; border-radius: 15px; padding: 15px; background-color: rgb(255, 250, 243);"
>
<div
*
ngIf=
"item.wrongType == 'pic'"
style=
"width: 300px;"
>
<app-upload-image-with-preview
[
picUrl
]="
wrongData
.
pic_url
"
(
imageUploaded
)="
onItemImgUploadSuccess
($
event
,
wrongData
,
'
pic_url
')"
>
</app-upload-image-with-preview>
</div>
<div
*
ngIf=
"item.wrongType == 'text'"
style=
"border: 1px #ccc solid; border-radius: 15px; padding: 15px; background-color: rgb(255, 250, 243);"
>
<div>
<div
style=
"margin-top: 5px; display: flex; align-items: center; "
>
<span
style=
""
>
文本:
</span>
<input
type=
"text"
nz-input
[(
ngModel
)]="
wrongData
.
text
"
(
blur
)="
save
()"
style=
" width: 300px;"
>
</div>
</div>
</div>
</div>
...
...
form/src/app/form/form.component.ts
View file @
ee51b6ca
...
...
@@ -532,10 +532,16 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
// this.item.partArr = [];
// }
if
(
!
this
.
item
.
wrongType
)
{
this
.
item
.
wrongType
=
'
text
'
;
}
}
templateTypeChange
(
e
)
{
console
.
log
(
"
in templateTypeChange e:
"
,
e
);
this
.
item
.
templateType
=
e
;
...
...
@@ -806,7 +812,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this
.
item
.
wrongArr
=
[];
}
this
.
item
.
wrongArr
.
push
(
{}
{
text
:
''
,
pir_url
:
''
}
);
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