inleft
2022-08-14 1cf6d9fb8cf2f10e302509f033d8d55b4e60712c
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
<template>
    <div class="section">
        <com-article :articles="articleList" ref="myCom"></com-article>
    </div>
</template>
 
<script>
    import comArticle from './article.vue'
    export default {
        name: 'HH',
        components: {
            comArticle
        },
        props: {
            articleList: ""
        },
        data() {
            return {
                // articleList: ['红楼梦', '西游记', '三国演义']
            }
        },
        mounted() {
            const comB = this.$refs.myCom;
            console.log(comB.name); // Vue.js
        }
    }
</script>