Files
xk-api-yii/admin/components/UI/Form/Editor.php
2024-09-19 11:32:39 +08:00

39 lines
715 B
PHP

<?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;
}
}