SOURCE

console 命令行工具 X clear

                    
>
console
Vue.component('blog-post', {
  props: ['title','id'],
  template: '<div><span>{{ id }}</span>&copy;<span>{{ title }}</span></div>'
});

new Vue({
  el: '#blog-post-demo',
  data: {
    posts: [
      { id: 1, title: 'My journey with Vue' },
      { id: 2, title: 'Blogging with Vue' },
      { id: 3, title: 'Why Vue is so fun' }
    ]      
  }
});
<div id="blog-post-demo">
<blog-post
  v-for="post in posts"
  v-bind:id="post.id"
  v-bind:title="post.title"
></blog-post>
</div>

本项目引用的自定义外部资源