From e43e301d07cccf61753cd6ee99459771e835b42c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 12 Apr 2021 16:15:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gii/GiiController.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Gii/GiiController.php b/Gii/GiiController.php index 131e356c..0430ad63 100644 --- a/Gii/GiiController.php +++ b/Gii/GiiController.php @@ -393,9 +393,15 @@ use {$model_namespace}\\{$managerName}; } else { $order = \'id desc\'; } - + //列表输出 $model = ' . $managerName . '::find()->where($this->input->gets())->orderBy($order); + + $keyword = $this->input->get(\'keyword\', null); + if (!empty($keyword)) { + $model->like(\'keyword\', $keyword); + } + if ((int) $count === 1) { $count = $model->count(); }