element-ui 表头自定义后新加了一个下拉框和表格自带的筛选下拉框相冲突?多选框选不了的问题

  • 问题:表头自定义后新加了一个下拉框(下拉框里放的多选框)和表格自带的筛选下拉框时的多选框冲突选不了的问题
  • 解决方法:在自定义表头的template 标签里加slot-scope="scope"或者slot-scope="{}",自定义时这个属性不加会出现很多坑!
 <el-table
	:filters="priority"
     width="100"
    :filter-method="filterHandler"
>

        //自定义表头
		<template slot='header' slot-scope="{}">
          {{item.label}}
          
          <el-dropdown :hide-on-click="false"  class='batchdrop'>
            <span class="el-dropdown-link">
              <i class="fa fa-briefcase batchdropicon" aria-hidden="true" ></i>
            </span>
            
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item style="overflow:auto">
                <el-checkbox-group v-model="checkedColumnAlarmW" >
                  <el-checkbox label="复选框 A"></el-checkbox>
                  <el-checkbox label="复选框 B"></el-checkbox>
                  <el-checkbox label="复选框 C"></el-checkbox>
                  <el-checkbox label="禁用" disabled></el-checkbox>
                  <el-checkbox label="选中且禁用" disabled></el-checkbox>
       
                </el-checkbox-group>
              </el-dropdown-item>
              <el-dropdown-item divided>
                <el-button type="primary" @click="3">批量</el-button>
              </el-dropdown-item>
            </el-dropdown-menu>
        </el-dropdown>
        </template>
        </template>
</el-table>



你可能感兴趣的:(UI组件二改,前端,javascript,开发语言,elementui)