SOURCE

console 命令行工具 X clear

                    
>
console
new Vue({
  el: '#app',
  // 绑定id为app的元素, 只操作app内的标签
  data: {
    text: 'hello world'
  },
  // 自定义变量, 都放在data对象下面
  methods: {
    changeText: function() {
      this.text = 'hello china';
    }
  }
});
<div id="app">
  <p>
    {{text}}
  </p>
  <button v-on:click="changeText">
    改变
  </button>
</div>