clearing select field automatically after selecting item

前端 未结 4 1413
执念已碎
执念已碎 2021-01-18 08:29

I can\'t find a way to clear the select field in method \"afterselection\" which is invoked after selecting an item:

template:



        
4条回答
  •  梦毁少年i
    2021-01-18 09:18

    you can achieve this by adding ref to the component

    
    

    then use the reset method of v-select component whenever you want!

    afterselection(item) {
      if (item) {
        console.log(item);
        this.$refs['adrlistRef'].reset();
      }
    }
    

提交回复
热议问题