Browse Source

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

jqh 5 năm trước cách đây
mục cha
commit
97de68519d
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  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()};
     }