-
Notifications
You must be signed in to change notification settings - Fork 0
/
PracticeBody.vue
45 lines (43 loc) · 1.18 KB
/
PracticeBody.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<template>
<v-container fluid id="practice-body" px-16 py-0>
<Video
:artist="selectedCallInfo.artist"
:title="selectedCallInfo.title"
:bpm="selectedCallInfo.bpm"
:videoId="videoId"
></Video>
<Subtitle
:lyricsLines="lyricsLines"
></Subtitle>
</v-container>
</template>
<script>
import axios from 'axios'
import {mapGetters} from 'vuex'
import Video from './Video.vue'
import Subtitle from './Subtitle.vue'
export default {
name: "PracticeBody",
components: {
Video,
Subtitle,
},
data() {
return {
lyricsLines: [],
}
},
computed: {
...mapGetters(["selectedCallInfo", "videoId"]),
},
created() {
axios.get("/calls/get_lyrics",{params: {callId: this.selectedCallInfo.id}})
.then(res => {
this.lyricsLines = res.data
})
},
mounted() {
document.title = `練習中: ${this.selectedCallInfo.artist} - ${this.selectedCallInfo.title} | Sycall`
},
}
</script>