inleft
2022-08-11 859ec7a60a9a1f30c898dbf1ae05c50dccfc40e5
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>