SOURCE

console 命令行工具 X clear

                    
>
console
 Vue.component('ele', {
            render: function(createElement) {
                return createElement('button', {
                    'class': {
                        show: this.show
                    },
                    attrs: {
                        id: 'elem'
                    },
                    on: {
                        click: this.handleClick
                    }
                }, '文本');
            },
            data: function() {
                return {
                    show: true
                }
            },
            methods: {
                handleClick: function() {
                    console.log('clicked!');
                }
            }
        });
        new Vue({
            el: '#app'
        });
<div id="app">
  <ele>
  </ele>
</div>