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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
| <template>
| <div class="myModal">
| <a-modal v-model="visible" title="视频盒子" :width="myWidth" :footer="null" :mask="false" :maskClosable="true"
| :bodyStyle="{'overflow':'overlay','height': '750px'}" :afterClose="afterClose" >
| <videoDetail ref="videoDetail" :showFade="showFade"></videoDetail>
| </a-modal>
| </div>
|
| </template>
|
| <script>
| import videoDetail from "../mini/box16-videoDetail.vue"
|
| export default {
| components: {
| videoDetail,
| },
| mounted() {
| this.juseWidth(document.body.clientWidth)
| window.onresize = () => {
| return (() => {
| this.juseWidth(document.body.clientWidth)
| })();
| };
| },
| watch: {
| // '$route'(to, from) {
| // if ("mdDetail" === to.name) {
| // this.articleId = this.$route.query.id;
| // this.articleFileType = this.$route.query.articleFileType;
| // }
| // },
| articleId: function(newValue, oldValue) {
| if (newValue == undefined || newValue == null || newValue == "") {
| this.showMsg = true;
| this.errorMsg = "日志id参数缺失";
| } else {
| this.$nextTick(function() {
| this.$refs.myComment.updateCommentList(this.articleId);
| })
| }
| },
| },
| data() {
| return {
| visible: false,
| articleId: "",
| myWidth: 410,
| showFade: true,
| }
| },
| methods: {
| juseWidth(screenWidth) {
| this.showFade = true;
| if (screenWidth > 1000) {
| this.myWidth = 1000
| } else if (screenWidth > 767) {
| this.myWidth = 600
| } else {
| this.myWidth = 410
| this.showFade = false;
| }
| },
| showModal(param) {
| this.visible = true;
| this.$nextTick(function() {
| this.$refs.videoDetail.showVideo(param)
| })
| },
| handleCancel(e) {
| this.visible = false;
| },
| afterClose() {
| this.$emit("closeMyVideo")
| }
| },
| }
| </script>
| <style scoped>
|
|
|
|
| </style>
|
|