options['sortable'] = $value; return $this; } /* * 裁剪比例 格式:1/1 */ public function aspectRatio(float $value = 1) { $this->options['aspectRatio'] = $value; return $this; } /** * Set a limit of files. * * @param int $limit * @return $this */ public function limit(int $limit) { if ($limit < 2) { return $this; } $this->options['fileNumLimit'] = $limit; return $this; } /** * Prepare for saving. * * @param string|array $file * @return array */ protected function prepareInputValue($file) { if ($path = request(static::FILE_DELETE_FLAG)) { $this->deleteFile($path); return array_values(array_diff($this->original, [$path])); } $file = Helper::array($file, true); $this->destroyIfChanged($file); return $file; } protected function forceOptions() { } }