Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script src="../node_modules/vue/dist/vue.js"></script>
- <div id="app">
- <example :tags="['h1', 'h2', 'h3']"></example>
- </div>
- <script>
- Vue.component('example', {
- props: ['tags'],
- render: (h) => {
- return h('div', {
- attrs: { id: 'hello'},
- }, this.tags.map((tag, index) => h(tag, index)))
- }
- })
- new Vue({ el: '#app' })
- </script>
Add Comment
Please, Sign In to add comment