初始化仓库
This commit is contained in:
38
admin/components/UI/Form/Editor.php
Normal file
38
admin/components/UI/Form/Editor.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace admin\components\UI\Form;
|
||||
|
||||
/**
|
||||
* 编辑器
|
||||
* @package backend\components\UI\Form
|
||||
*/
|
||||
class Editor extends Element implements Component
|
||||
{
|
||||
/**
|
||||
* @param string $name
|
||||
* @param string $field
|
||||
* @param string $has
|
||||
*/
|
||||
public function __construct(string $name, string $field, string $has = '')
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->field = $field;
|
||||
$this->has = $has;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function render(): array
|
||||
{
|
||||
$data = [
|
||||
'nodeName' => 'app-editor'
|
||||
];
|
||||
|
||||
if ($this->model) {
|
||||
$data['vModel:value'] = $this->getModelField();
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user