瀏覽代碼

增加默认数据

liaofei 2 年之前
父節點
當前提交
dfae6709f7
共有 1 個文件被更改,包括 6 次插入0 次删除
  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);