SOURCE

console 命令行工具 X clear

                    
>
console
var app = new Vue({
  el: '#app',
  components: {
    'anchored-heading': {
      props: {
        level: {
          type: Number,
          required: true
        }
      },
      render: function(createElement) {
        return createElement('h' + this.level, {
          class: ['foo', 'zoo'],
          style: {
            color: 'red',
            margin: 0
          },
          attrs: {
            id: 'title',
            'data-name': 'sssss'
          },
          props: {
            myProp: 'bar'
          },
          on: {
            click: function() {
              alert('you click me!')
            }
          },
          ref: 'title'
        }, this.$slots.default)
      }
    }
  }
})
<div id='app'>
  <anchored-heading :level='1'>Hello world!</anchored-heading>
</div>