12.Vue不使用V-model双向绑定的情况下获取input的值

HTML:
  <input class="edit-cell" v-if="row.num == '-'" ref="history_Num" type="number" style="width: 100%;border: 1px solid #c3d4ff;padding: 4px;text-align: center;">

Data中:
  data(){
    return{
      history_Num:'',
    }
  }

Methods:

  aa(){

    let num:this.$refs.history_Num.value

  }
  

猜你喜欢

转载自www.cnblogs.com/xintao/p/10751987.html
今日推荐