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