소스 검색

修复模型树RowAction异步处理接口时获取主键报错问题

jqh 4 년 전
부모
커밋
97de68519d
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/Tree/RowAction.php

+ 4 - 0
src/Tree/RowAction.php

@@ -26,6 +26,10 @@ class RowAction extends Action
      */
     public function getKey()
     {
+        if ($key = parent::getKey()) {
+            return $key;
+        }
+
         return $this->row->{$this->actions->parent()->getKeyName()};
     }