Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
et_01
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
et_01
Commits
548a555c
Commit
548a555c
authored
Feb 23, 2021
by
智慧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:添加表单RadioButton
parent
6540ab3b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
27 deletions
+27
-27
form.component.html
form/src/app/form/form.component.html
+19
-26
form.component.ts
form/src/app/form/form.component.ts
+8
-1
No files found.
form/src/app/form/form.component.html
View file @
548a555c
...
...
@@ -2,33 +2,26 @@
<div
style=
"padding: 10px;"
>
<div
style=
"width: 300px;"
align=
'center'
>
<span>
图1:
</span>
<app-upload-image-with-preview
[
picUrl
]="
item
.
pic_url
"
(
imageUploaded
)="
onImageUploadSuccess
($
event
,
'
pic_url
')"
>
</app-upload-image-with-preview>
</div>
<div
style=
"width: 300px; margin-top: 5px;"
align=
'center'
>
<span>
图2:
</span>
<app-upload-image-with-preview
[
picUrl
]="
item
.
pic_url_2
"
(
imageUploaded
)="
onImageUploadSuccess
($
event
,
'
pic_url_2
')"
>
</app-upload-image-with-preview>
</div>
<div
style=
"width: 300px; margin-top: 15px;"
>
<span>
文本:
</span>
<input
type=
"text"
nz-input
[(
ngModel
)]="
item
.
text
"
(
blur
)="
save
()"
>
</div>
<div
style=
"margin-top: 5px"
>
<span>
音频:
</span>
<app-audio-recorder
[
audioUrl
]="
item
.
audio_url
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
audio_url
')"
></app-audio-recorder>
<span>
选择骨骼动画:
</span>
<div
style=
"padding: 10px;"
></div>
<nz-radio-group
[(
ngModel
)]="
item
.
animationName
"
(
ngModelChange
)="
changeRadio
($
event
,
item
)"
>
<label
nz-radio
nzValue=
"Greetings"
>
Greetings
</label>
<label
nz-radio
nzValue=
"WarmUp"
>
Warm Up
</label>
<label
nz-radio
nzValue=
"Phonics"
>
Phonics
</label>
<label
nz-radio
nzValue=
"LettersInLife"
>
Letters in Life
</label>
<label
nz-radio
nzValue=
"LetsBlend"
>
Let's Blend
</label>
<label
nz-radio
nzValue=
"ExerciseTime"
>
Exercise Time
</label>
<label
nz-radio
nzValue=
"TraceWithMe"
>
Trace With me
</label>
<label
nz-radio
nzValue=
"LookAndSay"
>
Look and Say
</label>
<label
nz-radio
nzValue=
"LetsReview"
>
Let's Review
</label>
<label
nz-radio
nzValue=
"SightWords"
>
Sight Words
</label>
<label
nz-radio
nzValue=
"StoryTime"
>
Story Time
</label>
<label
nz-radio
nzValue=
"Topic"
>
Topic
</label>
<label
nz-radio
nzValue=
"ReadClosely"
>
Read Closely
</label>
</nz-radio-group>
</div>
</div>
...
...
form/src/app/form/form.component.ts
View file @
548a555c
...
...
@@ -10,9 +10,10 @@ import { JsonPipe } from '@angular/common';
export
class
FormComponent
implements
OnInit
,
OnChanges
,
OnDestroy
{
// 储存数据用
saveKey
=
"
test_0
01
"
;
saveKey
=
"
et_
01
"
;
// 储存对象
item
;
animationName
=
'
Greetings
'
;
constructor
(
private
appRef
:
ApplicationRef
,
private
changeDetectorRef
:
ChangeDetectorRef
)
{
...
...
@@ -92,6 +93,12 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this
.
save
();
}
changeRadio
(
e
,
item
)
{
console
.
log
(
"
e:
"
+
e
);
this
.
item
.
animationName
=
e
;
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