选择项目后自动清除选择字段

Gsc*_*ora 5 vuetify.js

我找不到在选择项目后调用的“ afterselection”方法中清除选择字段的方法:

模板:

<v-select
 :items="adrlist"
 @input="afterselection"        
 ></v-select>
Run Code Online (Sandbox Code Playgroud)

选择的数据:

const addressList = [{
"text":"Street 523, 2533",
"value":[1723455.7054408004,5923451.382843224]},
{"text":"Lala 3, 3455",
"value":[1723455.7054408004,5923451.382843224],
}]
Run Code Online (Sandbox Code Playgroud)

验证码:

new Vue({
  el: '#app',
  data () {
    return {
      adrlist: addressList,
    }
  },
  methods:{
    afterselection(item){
      console.log(item);
      //here I want to clear the select
    },
  },
})
Run Code Online (Sandbox Code Playgroud)

这是带有此示例的代码笔:
codepen示例

我试图将v模型设置为null,但这不起作用。

我已经研究和尝试了几天,但我真的找不到解决方法:-/

Gsc*_*ora 5

仅供参考,您可以使用

this.$nextTick(() => {
    this.selected = null  
  })
Run Code Online (Sandbox Code Playgroud)

重要的是“ nextTick”!否则将无法呈现...

请参阅由vuetify-dev提供的该Codepen: 有效Codepen

  • @VagnerGon 但是为什么要使用那个 hacky 方法而不是专门为此目的定义的 Vue 方法呢? (2认同)