Przeglądaj źródła

增加默认数据

liaofei 2 lat temu
rodzic
commit
dfae6709f7
1 zmienionych plików z 6 dodań i 0 usunięć
  1. 6 0
      crmeb/crmeb/services/crud/Service.php

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

@@ -123,6 +123,12 @@ class Service extends Make
      */
      */
     protected function getOptionContent(array $option = [])
     protected function getOptionContent(array $option = [])
     {
     {
+        if (!$option) {
+            $option = [
+                ['value' => 1, 'label' => '开启'],
+                ['value' => 0, 'label' => '关闭']
+            ];
+        }
         $php = '';
         $php = '';
         if ($option) {
         if ($option) {
             $res = var_export($option, true);
             $res = var_export($option, true);