fixed editor
This commit is contained in:
parent
3909475219
commit
a9b5010045
|
|
@ -13,7 +13,7 @@ class DesignController extends Controller
|
|||
public function index(Request $request)
|
||||
{
|
||||
$data = [
|
||||
'editors' => ['de-slide_show']
|
||||
'editors' => ['editor-slide_show']
|
||||
];
|
||||
return view('design.builder.index', $data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class HomeController extends Controller
|
|||
{
|
||||
$data = [
|
||||
'category_products' => ProductRepo::getProductsByCategories([100002, 100003, 100004, 100005]),
|
||||
'renders' => ['dr-slide_show']
|
||||
'renders' => ['render-slide_show']
|
||||
];
|
||||
|
||||
return view('home', $data);
|
||||
|
|
|
|||
|
|
@ -81,28 +81,21 @@ class ShopServiceProvider extends ServiceProvider
|
|||
protected function loadDesignComponents()
|
||||
{
|
||||
$viewPath = base_path() . '/beike/Shop/View';
|
||||
$editorPath = $viewPath . '/DesignEditor/';
|
||||
$renderPath = $viewPath . '/DesignRender/';
|
||||
$builderPath = $viewPath . '/DesignBuilders/';
|
||||
|
||||
$editorFiles = glob($editorPath . '*');
|
||||
foreach ($editorFiles as $editorFile) {
|
||||
$editorName = basename($editorFile, '.php');
|
||||
$editorAliasName = Str::snake($editorName);
|
||||
$editorComponentName = Str::studly($editorName);
|
||||
$fullName = "\\Beike\\Shop\\View\\DesignEditor\\{$editorComponentName}";
|
||||
$this->loadViewComponentsAs('de', [
|
||||
$editorAliasName => $fullName,
|
||||
$builderFolders = glob($builderPath . '*');
|
||||
foreach ($builderFolders as $builderFolder) {
|
||||
$folderName = basename($builderFolder, '.php');
|
||||
$aliasName = Str::snake($folderName);
|
||||
$componentName = Str::studly($folderName);
|
||||
|
||||
$fullName = "\\Beike\\Shop\\View\\DesignBuilders\\{$componentName}";
|
||||
$this->loadViewComponentsAs('editor', [
|
||||
$aliasName => $fullName . '\\Editor',
|
||||
]);
|
||||
}
|
||||
|
||||
$renderFiles = glob($renderPath . '*');
|
||||
foreach ($renderFiles as $renderFile) {
|
||||
$editorName = basename($renderFile, '.php');
|
||||
$editorAliasName = Str::snake($editorName);
|
||||
$editorComponentName = Str::studly($editorName);
|
||||
$fullName = "\\Beike\\Shop\\View\\DesignRender\\{$editorComponentName}";
|
||||
$this->loadViewComponentsAs('dr', [
|
||||
$editorAliasName => $fullName,
|
||||
$this->loadViewComponentsAs('render', [
|
||||
$aliasName => $fullName . '\\Render',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
<?php
|
||||
/**
|
||||
* SlideShow.php
|
||||
* Render.php
|
||||
*
|
||||
* @copyright 2022 opencart.cn - All Rights Reserved
|
||||
* @link http://www.guangdawangluo.com
|
||||
* @author Edward Yang <yangjin@opencart.cn>
|
||||
* @created 2022-07-08 15:23:18
|
||||
* @modified 2022-07-08 15:23:18
|
||||
* @created 2022-07-08 17:09:15
|
||||
* @modified 2022-07-08 17:09:15
|
||||
*/
|
||||
|
||||
namespace Beike\Shop\View\DesignEditor;
|
||||
namespace Beike\Shop\View\DesignBuilders\SlideShow;
|
||||
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
use Illuminate\Contracts\View\View;
|
||||
|
||||
class SlideShow extends Component
|
||||
class Editor extends Component
|
||||
{
|
||||
/**
|
||||
* Create a new component instance.
|
||||
|
|
@ -28,7 +28,7 @@ class SlideShow extends Component
|
|||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*
|
||||
* @return View|
|
||||
* @return View
|
||||
*/
|
||||
public function render(): View
|
||||
{
|
||||
|
|
@ -1,20 +1,20 @@
|
|||
<?php
|
||||
/**
|
||||
* SlideShow.php
|
||||
* Render.php
|
||||
*
|
||||
* @copyright 2022 opencart.cn - All Rights Reserved
|
||||
* @link http://www.guangdawangluo.com
|
||||
* @author Edward Yang <yangjin@opencart.cn>
|
||||
* @created 2022-07-08 15:23:18
|
||||
* @modified 2022-07-08 15:23:18
|
||||
* @created 2022-07-08 17:09:15
|
||||
* @modified 2022-07-08 17:09:15
|
||||
*/
|
||||
|
||||
namespace Beike\Shop\View\DesignRender;
|
||||
namespace Beike\Shop\View\DesignBuilders\SlideShow;
|
||||
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
use Illuminate\Contracts\View\View;
|
||||
|
||||
class SlideShow extends Component
|
||||
class Render extends Component
|
||||
{
|
||||
/**
|
||||
* Create a new component instance.
|
||||
|
|
@ -23,7 +23,6 @@ class SlideShow extends Component
|
|||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -33,7 +32,6 @@ class SlideShow extends Component
|
|||
*/
|
||||
public function render(): View
|
||||
{
|
||||
|
||||
return view('design.module.slideshow.render.index');
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue