1
1
<template >
2
2
<el-row class =" player" >
3
- <el-row class =" player-title" >
4
- <el-row class =" player-title-box" type =" flex" justify =" space-between" >
5
- <span >
6
- <span >{{Object.keys(video).length !== 0 ? video.name + ' -- ' : '无视频 -- '}}</span >
7
- <span >{{ num }}</span >
8
- </span >
9
- <span v-show =" Object.keys(video).length > 0" >
10
- <el-button size =" mini" @click =" openDetail" icon =" el-icon-document" circle ></el-button >
11
- <el-button size =" mini" v-show =" !star" @click =" starEvent" icon =" el-icon-star-off" circle ></el-button >
12
- <el-button size =" mini" v-show =" star" @click =" starEvent" icon =" el-icon-star-on" circle ></el-button >
13
- </span >
3
+ <el-row class =" player-show" v-if =" Object.keys(video).length > 0" >
4
+ <el-row class =" player-title" >
5
+ <el-row class =" player-title-box" type =" flex" justify =" space-between" >
6
+ <span >
7
+ <span >{{video.name ? video.name + ' -- ' : '' }}</span >
8
+ <span >{{ num }}</span >
9
+ </span >
10
+ <span >
11
+ <el-button size =" mini" @click =" openDetail" icon =" el-icon-document" circle ></el-button >
12
+ <el-button size =" mini" v-show =" !star" @click =" starEvent" icon =" el-icon-star-off" circle ></el-button >
13
+ <el-button size =" mini" v-show =" star" @click =" starEvent" icon =" el-icon-star-on" circle ></el-button >
14
+ </span >
15
+ </el-row >
16
+ </el-row >
17
+ <el-row class =" player-box" >
18
+ <div id =" xg" ></div >
19
+ </el-row >
20
+ <el-row class =" player-films table-box" >
21
+ <el-row class =" player-films-box" >
22
+ <el-button :type =" j === video.index ? 'primary' : ''" size =" mini" v-for =" (i, j) in urls" :key =" j" @click =" playBtnClick(i, j)" plain >{{i | ftLink}}</el-button >
23
+ </el-row >
14
24
</el-row >
15
25
</el-row >
16
- <el-row class =" player-box" >
17
- <div id =" xg" ></div >
18
- </el-row >
19
- <el-row class =" player-films table-box" >
20
- <el-row class =" player-films-box" >
21
- <el-button :type =" j === video.index ? 'primary' : ''" size =" mini" v-for =" (i, j) in urls" :key =" j" @click =" playBtnClick(i, j)" plain >{{i | ftLink}}</el-button >
26
+ <el-row class =" player-none" v-if =" Object.keys(video).length <= 0" >
27
+ <el-row class =" tips" >
28
+ 浏览或者搜索资源, 点击播放视频, 即可观看~
29
+ </el-row >
30
+ <el-row class =" btns" >
31
+ <el-button size =" small" @click =" goView('Film')" icon =" el-icon-film" >浏览</el-button >
32
+ <el-button size =" small" @click =" goView('Search')" icon =" el-icon-search" >搜索</el-button >
22
33
</el-row >
23
34
</el-row >
24
35
</el-row >
@@ -62,8 +73,13 @@ export default Vue.extend({
62
73
this .SET_VIDEO (val )
63
74
}
64
75
},
65
- Main () {
66
- return this .$store .getters .getMain
76
+ Main: {
77
+ get () {
78
+ return this .$store .getters .getMain
79
+ },
80
+ set (val ) {
81
+ this .SET_MAIN (val )
82
+ }
67
83
}
68
84
},
69
85
watch: {
@@ -81,7 +97,10 @@ export default Vue.extend({
81
97
}
82
98
},
83
99
methods: {
84
- ... mapMutations ([' SET_DETAIL' , ' SET_VIDEO' ]),
100
+ ... mapMutations ([' SET_DETAIL' , ' SET_VIDEO' , ' SET_MAIN' ]),
101
+ goView (e : string ) {
102
+ this .Main = e
103
+ },
85
104
openDetail () {
86
105
let d = {
87
106
show: true ,
@@ -158,6 +177,22 @@ export default Vue.extend({
158
177
height : 100% ;
159
178
width : 100% ;
160
179
position : relative ;
180
+ .player-show {
181
+ height : 100% ;
182
+ width : 100% ;
183
+ position : relative ;
184
+ }
185
+ .player-none {
186
+ height : 100% ;
187
+ display : flex ;
188
+ justify-content : center ;
189
+ align-items : center ;
190
+ flex-direction : column ;
191
+ .tips {
192
+ font-size : 14px ;
193
+ margin-bottom : 10px ;
194
+ }
195
+ }
161
196
.player-title {
162
197
position : absolute ;
163
198
top : 0 ;
0 commit comments