<!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>
        const conc = Vue.extend({
            template: `<div><h2>哈哈</h2></div>`
        })
        Vue.component('my-cpn', conc)
        const app = new Vue({
            el: '#app',
            data: {
                message: 'geyao',
                age: ''
            },

        })
    </script>
</body>

</html>

运行结果