RichText 命名优化
This commit is contained in:
parent
e00ad4f241
commit
9b484e03f2
|
|
@ -140,7 +140,7 @@ class AdminServiceProvider extends ServiceProvider
|
|||
'form-select' => Select::class,
|
||||
'form-image' => Image::class,
|
||||
'form-textarea' => Textarea::class,
|
||||
'form-richtext' => Richtext::class,
|
||||
'form-rich-text' => RichText::class,
|
||||
'no-data' => NoData::class,
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ namespace Beike\Admin\View\Components\Form;
|
|||
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class Richtext extends Component
|
||||
class RichText extends Component
|
||||
{
|
||||
public string $name;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ class Richtext extends Component
|
|||
|
||||
public bool $required;
|
||||
|
||||
public function __construct(string $name, string $title, ?string $value, bool $required = false)
|
||||
public function __construct(string $name, string $title, string $value = '', bool $required = false)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->title = $title;
|
||||
|
|
@ -24,6 +24,6 @@ class Richtext extends Component
|
|||
|
||||
public function render()
|
||||
{
|
||||
return view('admin::components.form.richtext');
|
||||
return view('admin::components.form.rich-text');
|
||||
}
|
||||
}
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
</x-admin-form-textarea>
|
||||
@endif
|
||||
|
||||
@if ($column['type'] == 'richtext')
|
||||
@if ($column['type'] == 'rich-text')
|
||||
<x-admin-form-richtext
|
||||
:name="$column['name']"
|
||||
:title="$column['label']"
|
||||
|
|
|
|||
Loading…
Reference in New Issue