mirror of
http://124.126.16.154:8888/singularity/HyperfDevelopmentKit.git
synced 2026-01-15 00:35:08 +08:00
fix(studio.resource): 兼容灰度图为数组
This commit is contained in:
@@ -33,11 +33,11 @@ class Grayscale extends JsonResource
|
||||
public function toArray(): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'nameZh' => $this->nameZh,
|
||||
'nameEn' => $this->nameEn,
|
||||
'path' => $this->path,
|
||||
'pathPreview' => $this->pathPreview,
|
||||
'id' => $this->id ?? $this->resource['id'],
|
||||
'nameZh' => $this->nameZh ?? $this->resource['nameZh'],
|
||||
'nameEn' => $this->nameEn ?? $this->resource['nameEn'],
|
||||
'path' => $this->path ?? $this->resource['path'],
|
||||
'pathPreview' => $this->pathPreview ?? $this->resource['pathPreview'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user