iview的Cascader的on-change需要传入第三或者更多参入如何做?

@on-change="(value,selectedData)=>{setOption(value, selectedData,index)}"

增加Cascader on-change属性 setOption为自定义的方法名,index为传入的参数

下面是另一个例子

<div if="formItem.listenList != null">
			<div
				v-for="listened in formItem.listenList"
				style="position: relative; left: 80px; margin-bottom: 5px; margin-top: 30px;">
			<!-- 	<div v-bind:id="'listen_'+listened.id">  -->
					<!-- <i-select style="width:100px;" v-model="listened.eventTypeId" >
					<i-option v-for="parentType in eventParentType" :key = "parentType.id" :value = "parentType.id">
					{{parentType.name}}
					</i-option>
					</i-select> -->
					<i-select
						v-model="listened.eventTypeId"
						:disabled="formItemDisabled"
						style="width:300px;"> 
						<i-option
						v-for="event in eventParentType"
						:value="event.id"
						:key="event.id" placeholder="请选择事件">{{event.nameCn}}-{{event.name}}</i-option> </i-select>
					<!-- <i-input
						style="margin-left:5px;width:350px;"
						:disabled="formItemDisabled"
						v-model="listened.name"
						:data="listenedName"
						@on-search="handleParentTypeSearch"
						placeholder="ddd"> </i-input> -->
						<!-- <AutoComplete
						style="margin-left:5px;width:350px;"
						:disabled="formItemDisabled"
						v-model="listened.name"
						:data="listenedName"
						:filter-method=""
						placeholder="sss"> </AutoComplete> -->
						<Cascader v-model="listened.listenName" :data="policyAndVariable" filterable style="width:350px;" placeholder="sss" clearable @on-change="(value,selectedData)=>{handleListenCascader(value,selectedData,listened)}"></Cascader>
					<i-button
						type="dashed"
						@click="removeListen(listened)"> <Icon type="minus-circled"></Icon></i-button>
			<!-- 	</div> -->
			</div>

猜你喜欢

转载自blog.csdn.net/HappinessSourceL/article/details/83176351
今日推荐