Selaa lähdekoodia

修复单复选框无法换行bug

jqh 5 vuotta sitten
vanhempi
commit
559eddf955

+ 1 - 1
resources/views/widgets/checkbox.blade.php

@@ -1,5 +1,5 @@
 @if($inline)
-<div class="d-flex">
+<div class="d-flex flex-wrap">
 @endif
 
 @foreach($options as $k => $label)

+ 1 - 1
resources/views/widgets/radio.blade.php

@@ -1,5 +1,5 @@
 @if($inline)
-<div class="d-flex">
+<div class="d-flex flex-wrap">
 @endif
 
 @foreach($options as $k => $label)

+ 0 - 26
src/Form/Field/Checkbox.php

@@ -44,32 +44,6 @@ class Checkbox extends MultipleSelect
         return $this;
     }
 
-    /**
-     * Set or get value of the field.
-     *
-     * @param null $value
-     *
-     * @return mixed
-     */
-    public function value($value = null)
-    {
-        if (is_null($value)) {
-            if ($this->value === null) {
-                return $this->default();
-            }
-
-            if (count($this->value) === 0) {
-                return $this->default();
-            }
-
-            return $this->value;
-        }
-
-        $this->value = $value;
-
-        return $this;
-    }
-
     /**
      * {@inheritdoc}
      */