Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
goodluck
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
fukai
goodluck
Commits
73cbe31f
Commit
73cbe31f
authored
Jan 02, 2020
by
vito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add audio
parent
c85c64a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
README.md
README.md
+1
-0
App.vue
src/App.vue
+13
-4
No files found.
README.md
View file @
73cbe31f
...
...
@@ -39,6 +39,7 @@
-
本抽奖程序无暗箱操作,无后台,无后门。
-
名单和照片显示只需导入一种即可,无导入数据则使用抽奖号码。
-
建议使用最新的 Chrome 浏览器打开体验最佳。
-
由于背景游戏音乐加载较慢,可以在抽奖前提前打开缓存好。
## License
...
...
src/App.vue
View file @
73cbe31f
...
...
@@ -68,7 +68,15 @@
</div>
</transition>
<el-button
class=
"audio"
type=
"text"
@
click=
"audioPlaying = !audioPlaying"
>
<el-button
class=
"audio"
type=
"text"
@
click=
"
() =>
{
playAudio(!audioPlaying);
}
"
>
<i
class=
"iconfont"
:class=
"[audioPlaying ? 'iconstop' : 'iconplay1']"
...
...
@@ -96,6 +104,7 @@
autoplay
loop
@
play=
"playHandler"
@
pause=
"pauseHandler"
>
<source
:src=
"audioSrc"
/>
你的浏览器不支持audio标签
...
...
@@ -231,9 +240,6 @@ export default {
this
.
reloadTagCanvas
();
});
}
},
audioPlaying
(
v
)
{
this
.
playAudio
(
v
);
}
},
mounted
()
{
...
...
@@ -246,6 +252,9 @@ export default {
playHandler
()
{
this
.
audioPlaying
=
true
;
},
pauseHandler
()
{
this
.
audioPlaying
=
false
;
},
playAudio
(
type
)
{
if
(
type
)
{
this
.
$el
.
querySelector
(
'#audiobg'
).
play
();
...
...
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