v-model: 指令在表单 、 及 元素上创建双向数据绑定。它会根据控件类型自动选取正确的方法来更新元素
@keyup.enter: 敲击enter回车之后直接提交表单
click:事件绑定
<div id="app"><input type="text" v-model="city" @keyup.enter="getWeather"><button @click="getWeather">点击查询</button></div><script>var app = new Vue({el:"#app",data:{city:''},methods:{getWeather(){console.log(this.city)}}})</script>