render函数- table表格- el-popover-select-option

   render:(h,params)=>{
            return (
              <div>{
              <div>
                <el-popover
                ref="popover"
                placement="right"
                width="170"
                trigger="click">
                  <el-select
              v-model={params.row.channel}
              filterable
              placeholder="请选择分类"
              clearable
              onClear={()=>{this.hangleclear()}}
              onChange={(e)=>{ this.changeSelct(e, params.row, params.index)}}
              style="width:120px;padding-right:0px"
            >
              {this.select.channelId.map((item, index) => (
                      <el-option
                  key={item.id}
                  value={item.id}
                >{item.name}</el-option>
                  ))}
            </el-select>
                <span  slot="reference"  onClick={()=>{
                    this.handleChannelEdit(params.index, params.row)
                  }}  style="cursor:pointer;width: 100%;height:40px;line-height:40px;display:block;background-color:red"
                  >{ params.row.channel }  </span >
              </el-popover>
               </div>



              } </div>
            )

          }

 

posted on 2021-04-25 17:09  执着的烙印  阅读(639)  评论(0编辑  收藏  举报

导航