commit | author | age
|
146176
|
1 |
<template> |
I |
2 |
<div class="myModal"> |
1cf6d9
|
3 |
<a-modal v-model="visible" title="视频盒子" :width="myWidth" :footer="null" :mask="false" :maskClosable="true" |
I |
4 |
:bodyStyle="{'overflow':'overlay','height': '750px'}" :afterClose="afterClose" > |
|
5 |
<videoDetail ref="videoDetail" :showFade="showFade"></videoDetail> |
146176
|
6 |
</a-modal> |
I |
7 |
</div> |
1cf6d9
|
8 |
|
146176
|
9 |
</template> |
I |
10 |
|
|
11 |
<script> |
859ec7
|
12 |
import videoDetail from "../mini/box16-videoDetail.vue" |
I |
13 |
|
146176
|
14 |
export default { |
105729
|
15 |
components: { |
859ec7
|
16 |
videoDetail, |
1cf6d9
|
17 |
}, |
I |
18 |
mounted() { |
|
19 |
this.juseWidth(document.body.clientWidth) |
|
20 |
window.onresize = () => { |
|
21 |
return (() => { |
|
22 |
this.juseWidth(document.body.clientWidth) |
|
23 |
})(); |
|
24 |
}; |
859ec7
|
25 |
}, |
I |
26 |
watch: { |
|
27 |
// '$route'(to, from) { |
|
28 |
// if ("mdDetail" === to.name) { |
|
29 |
// this.articleId = this.$route.query.id; |
|
30 |
// this.articleFileType = this.$route.query.articleFileType; |
|
31 |
// } |
|
32 |
// }, |
|
33 |
articleId: function(newValue, oldValue) { |
|
34 |
if (newValue == undefined || newValue == null || newValue == "") { |
|
35 |
this.showMsg = true; |
|
36 |
this.errorMsg = "日志id参数缺失"; |
|
37 |
} else { |
|
38 |
this.$nextTick(function() { |
|
39 |
this.$refs.myComment.updateCommentList(this.articleId); |
|
40 |
}) |
|
41 |
} |
|
42 |
}, |
105729
|
43 |
}, |
146176
|
44 |
data() { |
I |
45 |
return { |
|
46 |
visible: false, |
859ec7
|
47 |
articleId: "", |
1cf6d9
|
48 |
myWidth: 410, |
I |
49 |
showFade: true, |
146176
|
50 |
} |
I |
51 |
}, |
|
52 |
methods: { |
1cf6d9
|
53 |
juseWidth(screenWidth) { |
I |
54 |
this.showFade = true; |
|
55 |
if (screenWidth > 1000) { |
|
56 |
this.myWidth = 1000 |
|
57 |
} else if (screenWidth > 767) { |
|
58 |
this.myWidth = 600 |
|
59 |
} else { |
|
60 |
this.myWidth = 410 |
|
61 |
this.showFade = false; |
|
62 |
} |
|
63 |
}, |
105729
|
64 |
showModal(param) { |
146176
|
65 |
this.visible = true; |
859ec7
|
66 |
this.$nextTick(function() { |
I |
67 |
this.$refs.videoDetail.showVideo(param) |
|
68 |
}) |
146176
|
69 |
}, |
I |
70 |
handleCancel(e) { |
|
71 |
this.visible = false; |
|
72 |
}, |
0dd41b
|
73 |
afterClose() { |
I |
74 |
this.$emit("closeMyVideo") |
|
75 |
} |
146176
|
76 |
}, |
I |
77 |
} |
|
78 |
</script> |
|
79 |
<style scoped> |
859ec7
|
80 |
|
1cf6d9
|
81 |
|
I |
82 |
|
|
83 |
|
146176
|
84 |
</style> |