SOURCE

console 命令行工具 X clear

                    
>
console
new Vue({
  el: "#app",
  data: {
    text: '',
    h: '20',
    w:'100',
    color:'red'
  },
  methods: {
    add: function() {
      this.h = this.text
    }
  }
})
<div id="app">
  <p>
    text:{{text}}
  </p>
  <input v-model.number="text" value='text' placeholder="请输入" />
  <br/>
  <br/>
  <textarea v-model='text' id=‘’ cols="25" value="text">
  </textarea>
  <br/>
  <button v-on:click="add">
    add
  </button>
  <div :style="{'height':h+'px','background-color':color,'width':w+'px'}">123
  </div>
</div>