diff --git a/beike/Admin/View/Components/Form/Input.php b/beike/Admin/View/Components/Form/Input.php index be86ae57..781000dd 100644 --- a/beike/Admin/View/Components/Form/Input.php +++ b/beike/Admin/View/Components/Form/Input.php @@ -10,14 +10,16 @@ class Input extends Component public string $title; public string $value; public string $class; + public string $width; public bool $required; - public function __construct(string $name, string $title, ?string $value, bool $required = false, ?string $class = '') + public function __construct(string $name, string $title, ?string $value, bool $required = false, ?string $class = '', ?string $width = '400') { $this->name = $name; $this->title = $title; $this->value = $value; $this->class = $class; + $this->width = $width; $this->required = $required; } diff --git a/beike/Admin/View/Components/Form/InputLocale.php b/beike/Admin/View/Components/Form/InputLocale.php index 59f778f2..4a553c24 100644 --- a/beike/Admin/View/Components/Form/InputLocale.php +++ b/beike/Admin/View/Components/Form/InputLocale.php @@ -9,13 +9,15 @@ class InputLocale extends Component { public string $name; public string $title; + public string $width; public $value; - public function __construct(string $name, string $title, $value) + public function __construct(string $name, string $title, $value, ?string $width = '400') { $this->name = $name; $this->title = $title; $this->value = $value; + $this->width = $width; } public function render() diff --git a/resources/beike/admin/views/components/form/input-locale.blade.php b/resources/beike/admin/views/components/form/input-locale.blade.php index 81f78f4d..e02be2b0 100644 --- a/resources/beike/admin/views/components/form/input-locale.blade.php +++ b/resources/beike/admin/views/components/form/input-locale.blade.php @@ -1,6 +1,6 @@ @foreach (locales() as $index => $locale) -
+
{{ $locale['name'] }}
@@ -11,25 +11,3 @@ @endif @endforeach - - -@if (0) -
- -
-
- @foreach (locales() as $index => $locale) -
- -
{{ $locale['name'] }}
-
- @if ($attributes->has('required')) - @error($errorKey($locale['code'])) - - @enderror - @endif - @endforeach -
-
-
-@endif diff --git a/resources/beike/admin/views/components/form/input.blade.php b/resources/beike/admin/views/components/form/input.blade.php index c969c67d..968ee851 100644 --- a/resources/beike/admin/views/components/form/input.blade.php +++ b/resources/beike/admin/views/components/form/input.blade.php @@ -1,4 +1,4 @@ - + {{ $slot }} diff --git a/resources/beike/admin/views/pages/products/form/form.blade.php b/resources/beike/admin/views/pages/products/form/form.blade.php index ea2bb0f0..1d02546c 100644 --- a/resources/beike/admin/views/pages/products/form/form.blade.php +++ b/resources/beike/admin/views/pages/products/form/form.blade.php @@ -33,7 +33,7 @@
数据
- + -
+
@foreach ($source['categories'] as $_category)