SOURCE

console 命令行工具 X clear

                    
>
console
new Vue({
  el: "#app",
  data: {
    num: '',
    up: true,
  },
  methods: {
    handleClick() {
      if (this.up) {
        this.num = '+1';
        this.up = false
      } else {
        this.num = '-1';
        this.up = true
      }
    }
  }
})
<script src="//unpkg.com/vue/dist/vue.js">
</script>
<div id="app">
  <button @click='handleClick'>
    点赞
  </button>
  <button @click='handleClick'>
    点踩
  </button>
  <hr />
  当前点击的{{num}}
</div>