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
f972a842
Commit
f972a842
authored
Nov 26, 2020
by
asdf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表单制作
parent
ce297878
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
11 deletions
+41
-11
form.component.html
form/src/app/form/form.component.html
+33
-10
form.component.ts
form/src/app/form/form.component.ts
+8
-1
No files found.
form/src/app/form/form.component.html
View file @
f972a842
<div
class=
"model-content"
>
<div
class=
"section-content;text-align:center"
>
<div
style=
"display: inline-block; margin-left: 20px;"
>
<span>
背景音乐
</span><span>
:
</span>
</div>
<div
style=
"display: inline-block; margin-bottom: 10px"
>
<app-audio-recorder
[
audioUrl
]="
contentObj
.
bgm_url
"
(
audioUploaded
)="
onBgmUploadSuccess
($
event
)"
>
</app-audio-recorder>
<div
class=
"card-config"
>
<div
class=
"card-item clearfix"
style=
"padding: 0.5vw; width: 600px; "
>
<div
class=
"card-item-content border"
>
<div
class=
"section-content;text-align:center"
>
<div
style=
"display: inline-block; margin-left: 20px;"
>
<span>
开始音频
</span><span>
:
</span>
</div>
<div
style=
"display: inline-block; margin-bottom: 10px;margin-left: 10px;"
>
<app-audio-recorder
[
audioUrl
]="
contentObj
.
bgm_url
"
(
audioUploaded
)="
onBgmUploadSuccess
($
event
)"
>
</app-audio-recorder>
</div>
</div>
<div
class=
"section-content;text-align:center "
>
<span
style=
"margin-bottom: 10px;margin-left: 20px;"
>
字母(小写,无需符号隔开。例如:ab):
</span>
<input
style=
"width: 200px; margin-bottom: 10px;margin-left: 10px;"
type=
"text"
nz-input
[(
ngModel
)]="
contentObj
.
letter
"
(
ngModelChange
)="
handleTextChange2
($
event
)"
>
</div>
</div>
</div>
</div>
<!-- <div class="card-config">
<div class="card-item clearfix">
<div class="card-item-content border">
</div>
</div>
</div> -->
<div
class=
"card-config"
>
<!-- 背景音乐 骨骼动画,音频,文字-------复制,粘贴 -->
<div
*
ngFor=
"let item of contentObj.dataArray; let i = index"
class=
"card-item clearfix"
...
...
@@ -18,7 +39,9 @@
<div
class=
"title"
>
第-
<strong>
{{ i+1}}
</strong>
-个单词
</div>
<div
class=
"section"
style=
"margin-top: 10px"
></div>
<div
class=
"section-content;text-align:center "
>
...
...
@@ -34,7 +57,7 @@
<div
class=
"section"
></div>
<div
class=
"section-content;text-align:center "
>
<span
style=
"margin-bottom: 10px;margin-left: 20px;"
>
文本
:
</span>
<span
style=
"margin-bottom: 10px;margin-left: 20px;"
>
单词
:
</span>
<input
style=
"width: 200px; margin-bottom: 10px;margin-left: 10px;"
type=
"text"
nz-input
[(
ngModel
)]="
item
.
text
"
(
ngModelChange
)="
handleTextChange
($
event
,
i
)"
>
</div>
...
...
@@ -47,7 +70,7 @@
</button>
</div>
</div>
<div
class=
"section"
style=
"margin-top: 10px"
></div>
<div
class=
"section-content;text-align:center"
style=
"margin-top: 10px"
>
...
...
form/src/app/form/form.component.ts
View file @
f972a842
...
...
@@ -31,6 +31,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
contentObj
=
{
"
version
"
:
"
1.1
"
,
bgm_url
:
""
,
letter
:
""
,
dataArray
:
[]
}
/**
...
...
@@ -65,6 +66,12 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this
.
refresh
();
}
handleTextChange2
(
text
)
{
this
.
contentObj
.
letter
=
text
;
this
.
saveItem
()
this
.
refresh
();
}
ngOnInit
()
{
this
.
item
=
{};
this
.
item
.
contentObj
=
{};
...
...
@@ -143,7 +150,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
addItem
(
item
)
{
item
.
push
({
text
:
""
,
shortAudio_url
:
''
,
image_url
:
""
,
words
:{}
})
item
.
push
({
text
:
""
,
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