commit | author | age
|
6461f5
|
1 |
<template> |
eeef9f
|
2 |
|
38a800
|
3 |
<a-tabs :defaultActiveKey="activeKey" :tabBarStyle="{'display': 'flex','justify-content': 'center'}"> |
I |
4 |
<a-tab-pane key="1" tab="片刻"> |
|
5 |
<videoList v-on="$listeners" :activeKey="activeKey"></videoList> |
|
6 |
</a-tab-pane> |
|
7 |
<a-tab-pane key="2" tab="流影"> |
|
8 |
<photoShow :activeKey="activeKey"></photoShow> |
|
9 |
</a-tab-pane> |
|
10 |
<a-tab-pane key="3" tab="谱库"> |
|
11 |
<photoShow :activeKey="activeKey"></photoShow> |
|
12 |
</a-tab-pane> |
|
13 |
</a-tabs> |
eeef9f
|
14 |
|
6461f5
|
15 |
</template> |
38a800
|
16 |
|
6461f5
|
17 |
<script> |
38a800
|
18 |
import videoList from "../mini/box14-video.vue" |
I |
19 |
import photoShow from "../mini/box18-photoShow.vue" |
|
20 |
|
6461f5
|
21 |
export default { |
38a800
|
22 |
components: { |
I |
23 |
videoList, |
|
24 |
photoShow |
|
25 |
}, |
|
26 |
created() { |
|
27 |
this.getActiveKey() |
|
28 |
}, |
|
29 |
watch: { |
|
30 |
'$route'(to, from) { |
|
31 |
if ("platform" === to.name) { |
|
32 |
this.getActiveKey() |
|
33 |
} |
|
34 |
}, |
6461f5
|
35 |
}, |
I |
36 |
methods: { |
38a800
|
37 |
getActiveKey() { |
I |
38 |
if (this.$route.query.activeKey == "" || this.$route.query.activeKey == undefined) { |
|
39 |
this.activeKey = this.defaultActiveKey; |
|
40 |
} else { |
|
41 |
this.activeKey = this.$route.query.activeKey; |
|
42 |
} |
|
43 |
}, |
|
44 |
}, |
|
45 |
data() { |
|
46 |
return { |
|
47 |
activeKey: "1", |
|
48 |
defaultActiveKey: "1", |
6461f5
|
49 |
} |
38a800
|
50 |
}, |
I |
51 |
|
6461f5
|
52 |
} |
I |
53 |
</script> |
38a800
|
54 |
|
I |
55 |
<style lang="less"> |
|
56 |
.ant-tabs-tab { |
|
57 |
user-select: none; |
|
58 |
} |
|
59 |
</style> |