<!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>
    <!--  <cpn>
        <h2>我是标题</h2>
    </cpn> -->
    <div id="app">
        <my-cpn></my-cpn>

    </div>
    <script src="./js/vue.js">
    </script>
    <script>
        Vue.component('my-cpn', {
            template: `<div><h2>我是标题1子</h2></div>`
        })

        const app = new Vue({
            el: '#app',
            data: {
                message: 'geyao',
                age: ''
            },

        })
    </script>
</body>

</html>

运行结果