new feature

This commit is contained in:
JaguarJack
2022-12-14 19:25:52 +08:00
parent b63cd5d01c
commit 098463f4e1
35 changed files with 391 additions and 146 deletions

View File

@@ -1,9 +1,8 @@
<?php
namespace Modules\Options\Repository;
use Catch\CatchAdmin;
use Catch\Support\Composer;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Str;
@@ -22,7 +21,7 @@ class Components implements OptionInterface
public function get(): array
{
if ($module = request()->get('module')) {
$components = File::glob(CatchAdmin::getModuleViewsPath($module) . '*/*.vue');
$components = File::glob(CatchAdmin::getModuleViewsPath($module).'*/*.vue');
foreach ($components as $component) {
$this->components[] = [
@@ -31,10 +30,8 @@ class Components implements OptionInterface
'value' => Str::of($component)->replace(CatchAdmin::moduleRootPath(), '')->prepend('/')
];
}
}
return $this->components;
}
}