Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
公瑾
/
lucky-draw
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
c85c64a7
authored
2020-01-02 21:51:58 +0800
by
vito
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
audio
1 parent
d2dc5e3a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletions
src/App.vue
src/assets/begin.mp3
src/App.vue
View file @
c85c64a
...
...
@@ -89,7 +89,15 @@
Copyright©zhangyongfeng5350@gmail.com
</span>
<audio
id=
"audiobg"
:src=
"audioSrc"
preload=
"auto"
controls
autoplay
loop
>
<audio
id=
"audiobg"
preload=
"auto"
controls
autoplay
loop
@
play=
"playHandler"
>
<source
:src=
"audioSrc"
/>
你的浏览器不支持audio标签
</audio>
</div>
...
...
@@ -235,6 +243,9 @@ export default {
},
1000
);
},
methods
:
{
playHandler
()
{
this
.
audioPlaying
=
true
;
},
playAudio
(
type
)
{
if
(
type
)
{
this
.
$el
.
querySelector
(
'#audiobg'
).
play
();
...
...
src/assets/begin.mp3
View file @
c85c64a
No preview for this file type
Please
register
or
sign in
to post a comment