fix: 优化提示
This commit is contained in:
parent
4606f9c792
commit
e5be0ca2f8
@ -20,8 +20,9 @@ class Components implements OptionInterface
|
|||||||
|
|
||||||
public function get(): array
|
public function get(): array
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
if ($module = request()->get('module')) {
|
if ($module = request()->get('module')) {
|
||||||
$components = File::glob(CatchAdmin::getModuleViewsPath($module).'*'.DIRECTORY_SEPARATOR.'*.vue');
|
$components = File::glob(CatchAdmin::getModuleViewsPath($module) . '*' . DIRECTORY_SEPARATOR . '*.vue');
|
||||||
|
|
||||||
foreach ($components as $component) {
|
foreach ($components as $component) {
|
||||||
$_component = Str::of($component)
|
$_component = Str::of($component)
|
||||||
@ -38,5 +39,8 @@ class Components implements OptionInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $this->components;
|
return $this->components;
|
||||||
|
} catch (\Throwable $exception) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user