w***@gmail.com
w***@gmail.com
  • 发布:2022-10-09 10:01
  • 更新:2022-10-09 10:01
  • 阅读:654

uniapp input v-model 为什么不及时更新值,像是有防抖一样。

分类:uni-app

附件是视频。

<template>  
  <view>  
    <view class="row" style="display:flex;">input: <input type="text" v-model="a"></view>  
    <view>plaintext:   {{a}}</view>  
    <view class="row">  
      <slider style="width: 100%;" activeColor="#C00000" @changing="sliderChange($event)" min="0" max="10" step="0.1"/>  
    </view>  
  </view>  
</template>  

<script>  
export default {  
  name: "sliderTest",  

  data() {  
    return {a: 0}  

  }, methods: {  
    sliderChange(e) {  
      this.a = e.target.value  
      console.log('this. a', this.a)  
    }  
  }  
}  
</script>  
2022-10-09 10:01 负责人:无 分享
已邀请:

要回复问题请先登录注册