Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JJ_Game_Sort_Image
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
JJ_Game_Sort_Image
Commits
cbb605d2
Commit
cbb605d2
authored
Feb 17, 2025
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
2bd1138a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
form.component.html
form/src/app/form/form.component.html
+11
-2
form.component.ts
form/src/app/form/form.component.ts
+4
-1
No files found.
form/src/app/form/form.component.html
View file @
cbb605d2
...
@@ -13,6 +13,15 @@
...
@@ -13,6 +13,15 @@
<input
type=
"text"
nz-input
[(
ngModel
)]="
item
.
title
"
(
blur
)="
save
()"
style=
" width: 500px;"
>
<input
type=
"text"
nz-input
[(
ngModel
)]="
item
.
title
"
(
blur
)="
save
()"
style=
" width: 500px;"
>
</div>
</div>
<div
style=
"margin: 30px; display: flex; align-items: center;"
>
<h3
style=
"margin-right: 20px;"
>
类型:
</h3>
<nz-radio-group
[(
ngModel
)]="
item
.
type
"
(
ngModelChange
)="
save
()"
>
<label
nz-radio
nzValue=
"pic"
>
图片
</label>
<label
nz-radio
nzValue=
"text"
>
文本
</label>
<label
nz-radio
nzValue=
"picAndText"
>
图片+文本
</label>
</nz-radio-group>
</div>
<div
*
ngIf=
"item && item.quesArr"
>
<div
*
ngIf=
"item && item.quesArr"
>
<div
*
ngFor=
"let ques of item.quesArr; let i = index"
<div
*
ngFor=
"let ques of item.quesArr; let i = index"
style=
"border: 2px #ccc solid; border-radius: 15px; width: 1000px; padding: 30px; margin: 30px;"
>
style=
"border: 2px #ccc solid; border-radius: 15px; width: 1000px; padding: 30px; margin: 30px;"
>
...
@@ -142,7 +151,7 @@
...
@@ -142,7 +151,7 @@
</div>
</div>
<div
*
ngIf=
"
ques.optionTypeText
"
>
<div
*
ngIf=
"
item.type == 'text' || item.type == 'picAndText'
"
>
<div
style=
"margin-top: 5px; display: flex; align-items: center; "
>
<div
style=
"margin-top: 5px; display: flex; align-items: center; "
>
<span
style=
""
>
文本:
</span>
<span
style=
""
>
文本:
</span>
...
@@ -154,7 +163,7 @@
...
@@ -154,7 +163,7 @@
</div> -->
</div> -->
</div>
</div>
<div
*
ngIf=
"
ques.optionTypePic
"
style=
"margin-top: 10px; display: flex; "
>
<div
*
ngIf=
"
item.type == 'pic' || item.type == 'picAndText'
"
style=
"margin-top: 10px; display: flex; "
>
<span
style=
""
>
图片:
</span>
<span
style=
""
>
图片:
</span>
<div
style=
"width: 300px;"
>
<div
style=
"width: 300px;"
>
<app-upload-image-with-preview
[
picUrl
]="
option
.
pic_url
"
<app-upload-image-with-preview
[
picUrl
]="
option
.
pic_url
"
...
...
form/src/app/form/form.component.ts
View file @
cbb605d2
...
@@ -85,7 +85,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -85,7 +85,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
}
initItem
()
{
initItem
()
{
// 如果type未设置,设置默认值为"picture"
if
(
!
this
.
item
.
type
)
{
this
.
item
.
type
=
'
pic
'
;
}
}
}
init
()
{
init
()
{
...
...
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