<Select v-model="device.type" :label-in-value="true" @on-change="v=>{ setOption(v,'type')}">
    <Option v-for="item in deviceTypeList" :value="item.value" :key="item">{{ item.label }}</Option>
</Select>
 
我们在默认的函数内放一个匿名函数,这个函数执行一个我们定义好的`methods`传2个参数,一个是默认函数的参数,也就是获取点击选择的那个值,另一个函数就是我们需要用来判断的参数。


//setOption
setOption(value,type){
    console.log(value);
    console.log(type);
}


iview 为Select带有返回值的默认函数传参  阿星小栈

 

 

iview 为Select带有返回值的默认函数传参  阿星小栈

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-14
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-09
相关资源
相似解决方案