<div id="app"> <my-name> <h1 slot="header" slot-scope="p">ヘッダー {{ p.text }}</h1> <strong>佐藤</strong> <h2 slot="footer" slot-scope="p">フッター {{ p.text }}</h2> </my-name> </div>
Vue.component('my-name', { template: `` }); new Vue({ el: '#app' });私の名前は 鈴木 です。