vue中elementui command绑定变量对象方法
需求:点击下拉框,切换组,选中当前项<el-dropdown trigger="click" class="child-controllerChild"@command="(command) =>handleDispatchTabClickBoxCommand(command)">
·
需求:点击下拉框,切换组,选中当前项
<el-dropdown trigger="click" class="child-controllerChild"
@command="(command) =>handleDispatchTabClickBoxCommand(command)">
<img class="child-iconAndPhoneImg "
src="../assets/icons/dispatchAndCall/phoneMoreRow.png"
alt="">
<el-dropdown-menu slot="dropdown"
class="dispatchContainerDropdownMore">
<el-dropdown-item v-for="(itemMore,index) in table1PannelMore"
:key="index"
:command="{commandGroupId:itemMore.id,index:index}">{{itemMore.name}}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
这里绑定对象即可:command="{commandGroupId:itemMore.id,index:index}"
/**
* 调度table更多切换
*/
handleDispatchTabClickBoxCommand(command) {
this.dispatchCourentPage = 1;
this.currentSystemAddressBookItem = command.index;
//保存当前选中组id,方便分页标识
this.dispatchMorecommandGroupId = command.commandGroupId;
this.queryBookmember(command.commandGroupId);
},
效果
更多推荐
已为社区贡献16条内容
所有评论(0)