$mount方法是用来挂载我们的Vue.extend扩展的

html
<body>
        <div id="app">
           <diy></diy>
        </div>
</body>
    <template id="tmp">
        <div>用Vue.extend构造器生成一个组件,并用实例$mount挂载上去</div>
    </template>
js
 var demo = Vue.extend({
             template:`#tmp`   
        })
        new demo().$mount('diy')
原文地址:https://www.cnblogs.com/Model-Zachary/p/6947659.html