Explorar o código

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

jqh %!s(int64=4) %!d(string=hai) anos
pai
achega
97de68519d
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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()};
     }