Vue 2.0 refs could not get the dom node of the child component

1. Why output undefined

< html >

when you get the contents of the subcomponent
<head>
    <meta charset="utf-8">
    <title></title>
<script type="text/javascript" src="js/vue.js">
    
</script>
</head>
<body>    
    <div id="app">
        <button type="button" @click="a"></button>
        <div id="app1" ref="myid1">
            {{msg1}}
        </div>
        <aaa :msg2="msg2" ref="mytem1"></aaa>
        <button type="button" @click="b"></button>            
    </div>
<script type="text/javascript">
     var vm=new Vue({
         data:{
             msg1:"hellothis is Dom",
             msg2:"this is a template and data form Daddy",
         },
         methods:{
             a:function(){
                 var idl=this.$refs.myid1.innerHTML;
                 
                 console.log(idl);
                 },
             b:function(){
                 var idk=this.$refs.mytem1.innerHTML;
                 console.log(idk); 
             },     
         },
         components:{    
             "aaa":{
                 template:`
                 <div>
               {{msg2}}
           </div>`,
                 props:["msg2"],
                
                 },

             },
 
     }).$mount("-sharpapp");
</script>
</body>

< / html >

Oct.26,2021

maybe this.$refs.mytem1.innerHTML can't get the value.

reason: ref= "mytem1" is mounted on the component aaa , so this.$refs.mytem1 points to a component, not dom, so there is no innerHTML attribute.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e64e-2c406.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e64e-2c406.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?