Edwin Xu 3 лет назад
Родитель
Сommit
b3af5e98dc
1 измененных файлов с 27 добавлено и 27 удалено
  1. 27 27
      src/Form/Field/HasDepends.php

+ 27 - 27
src/Form/Field/HasDepends.php

@@ -1,27 +1,27 @@
-<?php
-
-namespace Dcat\Admin\Form\Field;
-
-trait HasDepends
-{
-    /**
-     * 联动加载多个字段.
-     *
-     * @param  array|string  $fields
-     * @param  bool  $clear
-     * @return $this
-     */
-    public function depends($fields = [], bool $clear = true)
-    {
-        $fields = array_map(function ($field) {
-            return $this->formatName($field);
-        }, (array) $fields);
-
-        return $this->addVariables([
-            'depends' => [
-                'fields' => json_encode($fields, \JSON_UNESCAPED_UNICODE),
-                'clear' => $clear,
-            ],
-        ]);
-    }
-}
+<?php
+
+namespace Dcat\Admin\Form\Field;
+
+trait HasDepends
+{
+    /**
+     * 联动加载多个字段.
+     *
+     * @param  array|string  $fields
+     * @param  bool  $clear
+     * @return $this
+     */
+    public function depends($fields = [], bool $clear = true)
+    {
+        $fields = array_map(function ($field) {
+            return $this->formatName($field);
+        }, (array) $fields);
+
+        return $this->addVariables([
+            'depends' => [
+                'fields' => json_encode($fields, \JSON_UNESCAPED_UNICODE),
+                'clear' => $clear,
+            ],
+        ]);
+    }
+}