Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chooseWord
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
chooseWord
Commits
d67de88b
Commit
d67de88b
authored
Nov 27, 2020
by
asdf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表单:答案开关
parent
f972a842
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
form.component.html
form/src/app/form/form.component.html
+4
-0
form.component.ts
form/src/app/form/form.component.ts
+7
-2
No files found.
form/src/app/form/form.component.html
View file @
d67de88b
...
...
@@ -85,6 +85,10 @@
<div
class=
"section"
style=
"margin-top: 10px"
></div>
<div
style=
"text-align: right; padding-right: 10px;padding-top: 0;"
>
<span
style=
"margin-bottom: 10px;margin-right: 20px;"
>
是否是正确答案? :
</span>
<nz-switch
style=
"margin-bottom: 10px;margin-right: 200px;"
[(
ngModel
)]="
item
.
isRight
"
(
ngModelChange
)="
onSwitchChange
()"
></nz-switch>
<button
style=
"margin-right: 20px;"
nz-button
nzType=
"primary"
(
click
)="
onCopyData
(
i
)"
>
<span>
复制本页
</span>
</button>
...
...
form/src/app/form/form.component.ts
View file @
d67de88b
...
...
@@ -31,7 +31,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
contentObj
=
{
"
version
"
:
"
1.1
"
,
bgm_url
:
""
,
letter
:
""
,
letter
:
""
,
dataArray
:
[]
}
/**
...
...
@@ -39,6 +39,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
* text:'apple',
* shortAudio_url:'',
* image_url:'',
* isRight:false,
* words:[]
* }
*/
...
...
@@ -144,13 +145,17 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this
.
save
()
}
onSwitchChange
()
{
this
.
save
()
}
deleteItem
(
item
,
index
)
{
item
.
splice
(
index
,
1
)
this
.
save
()
}
addItem
(
item
)
{
item
.
push
({
text
:
""
,
shortAudio_url
:
''
,
image_url
:
""
,
words
:
{}
})
item
.
push
({
text
:
""
,
isRight
:
false
,
shortAudio_url
:
''
,
image_url
:
""
,
words
:
{}
})
this
.
saveItem
();
setTimeout
(()
=>
{
window
.
scrollTo
(
0
,
document
.
body
.
scrollHeight
);
...
...
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