Ver código fonte

默认加入主键

liaofei 2 anos atrás
pai
commit
8e9cc52831
1 arquivos alterados com 3 adições e 0 exclusões
  1. 3 0
      crmeb/crmeb/services/crud/Service.php

+ 3 - 0
crmeb/crmeb/services/crud/Service.php

@@ -103,6 +103,9 @@ class Service extends Make
                 $value[] = '';
             }
             $value[] = $options['modelName'] ?? $options['menus'] ?? $name;
+            if (!empty($options['key'])) {
+                array_push($select, $options['key']);
+            }
             $value[] = implode(',', $select);
             if ($value && $var) {
                 $contentAction = str_replace($var, $value, $contentAction);