From ede0cd9fe2a05e61af0d2c2563926fd270e2d65e Mon Sep 17 00:00:00 2001 From: pushuo <229102104@qq.com> Date: Fri, 12 Aug 2022 12:00:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=A1=A8=E5=8D=95=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- beike/Admin/View/Components/Form/Input.php | 4 +++- .../View/Components/Form/InputLocale.php | 4 +++- .../components/form/input-locale.blade.php | 24 +------------------ .../views/components/form/input.blade.php | 2 +- .../views/pages/products/form/form.blade.php | 4 ++-- 5 files changed, 10 insertions(+), 28 deletions(-) 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)