1
0
mirror of https://github.com/cjango/dcat-vue.git synced 2025-12-06 22:40:03 +08:00

一些优化

This commit is contained in:
weiwait
2023-02-10 15:32:57 +08:00
parent ec52abe746
commit 9bda6574be
5 changed files with 343 additions and 328 deletions

View File

@@ -11,6 +11,7 @@ class Image extends Field\Image
{
protected $view = 'weiwait.dcat-vue::common';
protected string $disk;
protected bool $disableCropper = false;
protected function prepareInputValue($file)
{
@@ -61,6 +62,7 @@ class Image extends Field\Image
'dir' => $this->getDirectory(),
'uploaded_url' => route('dcat.admin.weiwait.file.uploaded'),
'obs_config_url' => route('dcat.admin.weiwait.file.obs-config'),
'disableCropper' => $this->disableCropper,
]);
}
@@ -139,4 +141,11 @@ class Image extends Field\Image
return $previews;
}
public function disableCropper(bool $disable = true): static
{
$this->disableCropper = $disable;
return $this;
}
}