inleft
2022-08-11 859ec7a60a9a1f30c898dbf1ae05c50dccfc40e5
commit | author | age
859ec7 1 <template>
I 2     <div>
3          <div class="boxMain">
4              <videoPlayBox></videoPlayBox>
5          </div>
6          <div class="articleComment">
7              <comment ref="myComment" :articleId="articleId" :isAllowedComment="isAllowedComment" :foldReply="true"/>
8          </div>
9     </div>
10
11 </template>
12
13 <script>
14     import {
15         history
16     } from '../../api/blogArticleComment.js'
17     import videoPlayBox from "../mini/box15-videoPlayBox.vue"
18     import comment from "../mini/box12-comment.vue"
19
20     export default {
21         components: {
22             videoPlayBox,
23             comment,
24         },
25         watch: {
26             // '$route'(to, from) {
27             //     if ("mdDetail" === to.name) {
28             //         this.articleId = this.$route.query.id;
29             //         this.articleFileType = this.$route.query.articleFileType;
30             //     }
31             // },
32             articleId: function(newValue, oldValue) {
33                 if (newValue == undefined || newValue == null || newValue == "") {
34                     this.showMsg = true;
35                     this.errorMsg = "日志id参数缺失";
36                 } else {
37                     this.$nextTick(function() {
38                         this.$refs.myComment.updateCommentList(this.articleId);
39                     })
40                 }
41             },
42         },
43         data() {
44             return {
45                 articleId: "",
46                 isAllowedComment: false
47             }
48         },
49         methods: {
50             showVideo(param) {
51                 this.articleId = param.id
52             },
53         },
54     }
55 </script>
56 <style scoped>
57     a {
58         color: black;
59     }
60
61     .boxMain {
62         display: flex;
63         justify-content: center;
64         padding: 20px;
65     }
66 </style>