< EL-드롭 클래스 = "dropdown_btn" @Command = "handleCommand" > < 스팬 클래스 = "엘 드롭 다운 링크" >更多</ 스팬 > < 엘 드롭 다운 메뉴 슬롯 = "드롭" > < 엘 드롭 -item : 명령 = "beforeHandleCommand ( 'A', scope.row)" >设备订单</ 엘 드롭 항목 > < 엘 드롭 항목 : 명령 = "beforeHandleCommand ( 'B', scope.row)" >设备位置</ 엘 - 드롭 다운 항목 > < 엘 - 드롭 다운 항목: 명령 = "beforeHandleCommand ( 'C', scope.row)" >设备转移</ 엘 드롭 항목 > </ 엘 드롭 다운 메뉴 > </ 엘 드롭 >
handleCommand (명령) { 스위치 (command.command) { 경우 "A" : // 设备订单 이 .toOrder (command.row.deviceId) 휴식 ; 경우에 "B" : // 设备位置 // this.deleteUser (command.index, command.row); 휴식 ; 경우 "C" : // 设备转移 // this.assignRole (command.index, command.row); 휴식 ; } } beforeHandleCommand (항목, 행) { 반환 { '명령': 항목, '행' : 행 } }