<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <cpn :cinfo="info"></cpn>
    </div>
    <template id="cpn">
        <div>
            <h2>{{cinfo}}</h2>
          
        </div>
    </template>

    <script src="./js/vue.js">
    </script>
    <script>
        const cpn = {
            template: '#cpn',
            // props: ['cmovies', 'cmessage'],
            props: {
                // cmovies: Array,
                //cmessage: String
                cinfo: {
                    type: Object,
                    default () {
                        return {

                        }
                    }
                }
            },
        }
        const app = new Vue({
            el: '#app',
            data: {
                info: {
                    name: 'geyao',
                    age: 18,
                    height: 1.88
                }

            },
            components: {
                'cpn': cpn
            }
        })
    </script>
</body>

</html>

运行结果