初始化仓库
This commit is contained in:
49
admin/components/UI/Layout.php
Normal file
49
admin/components/UI/Layout.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace admin\components\UI;
|
||||
|
||||
use admin\components\UI\Components\VueComponent;
|
||||
|
||||
class Layout extends VueComponent
|
||||
{
|
||||
private string $name='app-layout';
|
||||
private string $class='flex-grow w-10';
|
||||
private string $title;
|
||||
public function __construct($title){
|
||||
$this->title = $title;
|
||||
}
|
||||
public $child = [];
|
||||
function setup(string $script)
|
||||
{
|
||||
// TODO: Implement setup() method.
|
||||
}
|
||||
public function addChild($node){
|
||||
|
||||
$this->child[] = $node;
|
||||
}
|
||||
|
||||
function render()
|
||||
{
|
||||
return ['node'=>[
|
||||
"nodeName" => "div",
|
||||
"class" => "flex h-screen",
|
||||
"vSlot" => "{value: data}",
|
||||
"child" => [
|
||||
[
|
||||
'nodeName' => $this->name,
|
||||
'class' => $this->class,
|
||||
'title' => $this->title,
|
||||
'child' => [
|
||||
[
|
||||
'nodeName' => 'div',
|
||||
'class' => 'p-4',
|
||||
'child' => $this->child
|
||||
]
|
||||
]
|
||||
]
|
||||
],
|
||||
'setupScript'=>"\n return {}"
|
||||
]];
|
||||
// TODO: Implement render() method.
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user