inleft
2022-08-26 fa1bd95d533444d7360d1ada127b7a3279a3901f
commit | author | age
bf6fbe 1 <template>
L 2     <div class="section">
3         <com-article :articles="articleList" ref="myCom"></com-article>
4     </div>
5 </template>
6
7 <script>
8     import comArticle from './article.vue'
9     export default {
10         name: 'HH',
11         components: {
12             comArticle
13         },
14         props: {
15             articleList: ""
16         },
17         data() {
18             return {
19                 // articleList: ['红楼梦', '西游记', '三国演义']
20             }
21         },
22         mounted() {
23             const comB = this.$refs.myCom;
24             console.log(comB.name); // Vue.js
25         }
26     }
27 </script>