Browse Source

文件上传表单部分方法名称调整

jqh 4 years ago
parent
commit
a8f7cecbba
1 changed files with 9 additions and 7 deletions
  1. 9 7
      src/Form/Field/WebUploader.php

+ 9 - 7
src/Form/Field/WebUploader.php

@@ -37,13 +37,13 @@ trait WebUploader
     }
 
     /**
-     * @param bool $disable
+     * @param bool $value
      *
      * @return $this
      */
-    public function disableChunked(bool $disable = true)
+    public function chunked(bool $value = true)
     {
-        $this->options['chunked'] = ! $disable;
+        $this->options['chunked'] = $value;
 
         return $this;
     }
@@ -57,6 +57,8 @@ trait WebUploader
     {
         $this->options['chunkSize'] = $size * 1024;
 
+        $this->checked(true);
+
         return $this;
     }
 
@@ -108,9 +110,9 @@ trait WebUploader
      *
      * @return $this
      */
-    public function disableAutoSave(bool $value = true)
+    public function autoSave(bool $value = true)
     {
-        $this->options['autoUpdateColumn'] = ! $value;
+        $this->options['autoUpdateColumn'] = $value;
 
         return $this;
     }
@@ -122,9 +124,9 @@ trait WebUploader
      *
      * @return $this
      */
-    public function disableRemove(bool $value = true)
+    public function removeable(bool $value = true)
     {
-        $this->options['disableRemove'] = $value;
+        $this->options['disableRemove'] = ! $value;
 
         return $this;
     }