Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vue.js v-autocomplete观察程序未按预期工作_Vue.js_Vuetify.js - Fatal编程技术网

Vue.js v-autocomplete观察程序未按预期工作

Vue.js v-autocomplete观察程序未按预期工作,vue.js,vuetify.js,Vue.js,Vuetify.js,我的watcher无法使用我的v-autocomplete,经过多次尝试,我没有找到任何解决方案 导出默认值{ 数据:vm=>{ 客户:[], searchCustomer:null, 孤岛加载:false, 编辑:{ 标签:, 参考商店:, 参考客户:, 店铺订单号:, 状态:, }, }, 计算:{ 顾客{ //这个console.log可以工作 console.log'customerItems'; 把这个还给顾客; }, }, 观察:{ searchCustomer:functionin

我的watcher无法使用我的v-autocomplete,经过多次尝试,我没有找到任何解决方案

导出默认值{ 数据:vm=>{ 客户:[], searchCustomer:null, 孤岛加载:false, 编辑:{ 标签:, 参考商店:, 参考客户:, 店铺订单号:, 状态:, }, }, 计算:{ 顾客{ //这个console.log可以工作 console.log'customerItems'; 把这个还给顾客; }, }, 观察:{ searchCustomer:functioninput{ //永远不会显示此console.log console.log'searchCustomer',输入; 如果这是。正在加载{ 回来 } this.isLoading=true; 把这个还给我。$store .显示“客户/获取”,输入 .Then客户=>{ 这是。顾客=顾客; 返回客户; } .catcherr=>{ console.error; } .finally=>{ this.isLoading=false; }; }, }, 安装{ 此.$store.dispatch'customers/get'。然后customers=>{ 这是。顾客=顾客; //这个console.log可以工作 console.log'find customers',this.customers; }; }, }; 当我输入v-autocomplete时,我的观察者应该捕捉到它并打印一个console.log,它应该执行函数语句

console.log'searchCustomer',输入;从不显示,并且观察程序的其余部分不会执行。

尝试将.sync添加到v-autocomplete标记的:搜索输入属性:

   <v-autocomplete
      v-model="editedItem.ref_customer"
      :search-input.sync="searchCustomer"
      :loading="isLoading"
      :items="customerItems"
      color="white"

已经尝试过了,我得到:“.sync”修饰符在“v-bind”指令上不推荐使用。使用“v-model:propName”而不是Vuetify的哪个版本?vue:2.6.11和Vuetify:2.2.30