问题描述:
在调用elementUi中的select下拉框组件时,我想传递自定义参数来供我实现项目中的逻辑,
解决方案:
1.@change=“setCityAndCounty($event, ‘province’’)” // $event 是默认传的参数(选中的数据),province是自定义参数
@change="setCityAndCounty($event, 'province'')"
2.@change="(value) => setCityAndCounty(value,‘province’)" // value 默认传的参数(选中的数据)province是自定义参数
@change="(value) => setCityAndCounty(value,‘province’)"
同理elementUi中的其他组件也可以用这样的写法传自定义参数。