mirror of
https://github.com/cjango/dcat-vue.git
synced 2025-12-06 22:40:03 +08:00
一些优化
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user