当前位置:网站首页>Ant destination multiple selection

Ant destination multiple selection

2022-07-07 21:35:00 tonysh_ zds

clickThenSelect(record) {
        return {
          on: {
            click: () => { 
                let rowKeys=this.selectedRowKeys
                let rows =  this.selectionRows
                if(rowKeys.length>0 && rowKeys.includes(record.id)){
                    rowKeys.splice(rowKeys.indexOf(record.id),1)
                    rows.splice((record),1)
                }else{
                    rowKeys.push(record.id)
                    rows.push(record)
                }

                this.onSelectChange(rowKeys,rows);
            },
            dblclick: () => {
              this.handleDetail(record)
            }
          }
        }
      },
      ```
       The radio 
      ```
      clickThenSelect(record) {
                return {
                    on: {
                        click: () => {
                            this.onSelectChange(record.id.split(","), [record]);
                        },
                        dblclick: () => {
                            this.handleDetail(record)
                        }
                    }
                }
            },
            ```
原网站

版权声明
本文为[tonysh_ zds]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207071721495517.html