Bläddra i källkod

修复批量删除按钮无法禁用问题

Jiang qinghua 3 år sedan
förälder
incheckning
1bfd0c49d1
2 ändrade filer med 3 tillägg och 3 borttagningar
  1. 2 2
      src/Grid/Tools/BatchActions.php
  2. 1 1
      src/Widgets/Form.php

+ 2 - 2
src/Grid/Tools/BatchActions.php

@@ -101,9 +101,9 @@ class BatchActions extends AbstractTool
         $action->selectorPrefix = '.grid-batch-action-'.$this->actions->count();
 
         if ($key) {
-            $this->actions->push($action);
-        } else {
             $this->actions->put($key, $action);
+        } else {
+            $this->actions->push($action);
         }
 
         return $this;

+ 1 - 1
src/Widgets/Form.php

@@ -71,7 +71,7 @@ use Illuminate\Validation\Validator;
  * @method Field\MultipleFile        multipleFile($column, $label = '')
  * @method Field\MultipleImage       multipleImage($column, $label = '')
  * @method Field\Tree                tree($column, $label = '')
- * @method Field\Table               table($column, $callback)
+ * @method Field\Table               table($column, $labelOrCallback, $callback = null)
  * @method Field\ListField           list($column, $label = '')
  * @method Field\Timezone            timezone($column, $label = '')
  * @method Field\KeyValue            keyValue($column, $label = '')