表格中平时显示是span 点击之后变为input <span v-if="!editing" @click="edit()" >{{item.wenzi}}</span>
<input type="text"
v-el:input v-if="editing"
v-on:keyup.enter="blur()"
value="{{item.wenzi}}"
v-model="item.wenzi" > methods: {
blur: function () { this.editing = false
},
edit: function () { this.editing = true
this.$nextTick(function () { this.$els.input.focus()
})
},
添加回答
举报
0/150
提交
取消