From f54e09b1086c94819e2777f93ad2d1a696693467 Mon Sep 17 00:00:00 2001 From: wolfcode <37436228+wolf-leo@users.noreply.github.com> Date: Mon, 20 Nov 2023 12:49:20 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E5=85=BC=E5=AE=B9cu?= =?UTF-8?q?rd=E8=87=AA=E5=8A=A8=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/view/mall/goods/add.html | 2 +- app/admin/view/mall/goods/edit.html | 2 +- app/common.php | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/admin/view/mall/goods/add.html b/app/admin/view/mall/goods/add.html index e76d973..44b169a 100644 --- a/app/admin/view/mall/goods/add.html +++ b/app/admin/view/mall/goods/add.html @@ -61,7 +61,7 @@
- {:editor_textarea([],'describe')} + {:editor_textarea('','describe')}
diff --git a/app/admin/view/mall/goods/edit.html b/app/admin/view/mall/goods/edit.html index 832d1b2..d24a3b1 100644 --- a/app/admin/view/mall/goods/edit.html +++ b/app/admin/view/mall/goods/edit.html @@ -62,7 +62,7 @@
- {:editor_textarea($row,'describe')} + {:editor_textarea($row["describe"],'describe')}
diff --git a/app/common.php b/app/common.php index 7b2396c..2093778 100644 --- a/app/common.php +++ b/app/common.php @@ -122,15 +122,14 @@ if (!function_exists('auth')) { } /** - * @param $row + * @param string $detail * @param string $name * @param string $placeholder * @return string */ - function editor_textarea($row, string $name = 'desc', string $placeholder = '请输入'): string + function editor_textarea(string $detail, string $name = 'desc', string $placeholder = '请输入'): string { $editor_type = sysconfig('site', 'editor_type'); - $detail = is_array($row) ? ($row[$name] ?? '') : $row; return match ($editor_type) { 'ckeditor' => "", default => "",