Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
ww_matching_cards
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
ww_matching_cards
Commits
c4101002
Commit
c4101002
authored
Aug 12, 2020
by
liujiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
4d28318e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
play.component.ts
src/app/play/play.component.ts
+10
-2
No files found.
src/app/play/play.component.ts
View file @
c4101002
import
{
Component
,
ElementRef
,
ViewChild
,
OnInit
,
Input
,
OnDestroy
,
HostListener
,
OnChanges
}
from
'
@angular/core
'
;
import
{
Component
,
ChangeDetectorRef
,
ApplicationRef
,
ElementRef
,
ViewChild
,
OnInit
,
Input
,
OnDestroy
,
HostListener
,
OnChanges
}
from
'
@angular/core
'
;
import
*
as
_
from
'
lodash
'
;
...
...
@@ -35,7 +35,7 @@ export class PlayComponent extends BaseResizeComponent implements OnInit {
rightAudio
=
new
Audio
();
wrongAudio
=
new
Audio
();
constructor
()
{
constructor
(
private
appRef
:
ApplicationRef
,
private
changeDetectorRef
:
ChangeDetectorRef
)
{
super
();
this
.
rightAudio
.
src
=
'
assets/right.mp3
'
;
this
.
rightAudio
.
load
();
...
...
@@ -64,11 +64,19 @@ export class PlayComponent extends BaseResizeComponent implements OnInit {
this
.
data
=
data
;
}
this
.
dataChange
();
this
.
changeDetectorRef
.
markForCheck
();
this
.
changeDetectorRef
.
detectChanges
();
this
.
refresh
();
if
(
window
[
'
air
'
])
{
window
[
'
air
'
].
hideAirClassLoading
(
this
.
saveKey
,
this
.
data
);
}
},
this
.
saveKey
);
}
refresh
()
{
setTimeout
(()
=>
{
this
.
appRef
.
tick
();
},
1
);
}
dataChange
()
{
this
.
cardsArray
=
_
.
get
(
this
.
data
,
'
contentObj.cards
'
,
[]);
...
...
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