小编Gsc*_*ora的帖子

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

我找不到在选择项目后调用的“ 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,但这不起作用。

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

vuetify.js

5
推荐指数
1
解决办法
6877
查看次数

标签 统计

vuetify.js ×1