Guest User

Untitled

a guest
Oct 20th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. <script src="../node_modules/vue/dist/vue.js"></script>
  2.  
  3. <div id="app">
  4. <example :tags="['h1', 'h2', 'h3']"></example>
  5. </div>
  6.  
  7. <script>
  8. Vue.component('example', {
  9. props: ['tags'],
  10. render: (h) => {
  11. return h('div', {
  12. attrs: { id: 'hello'},
  13. }, this.tags.map((tag, index) => h(tag, index)))
  14. }
  15. })
  16. new Vue({ el: '#app' })
  17. </script>
Add Comment
Please, Sign In to add comment