From 235a34dc3c67002b946672d4ef633f44544698f3 Mon Sep 17 00:00:00 2001 From: sunhao Date: Tue, 25 Jul 2023 11:13:59 +0800 Subject: [PATCH] * zin: add actions block to formbase widget. --- lib/zin/wg/formbase/v1.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/zin/wg/formbase/v1.php b/lib/zin/wg/formbase/v1.php index aa20daffab..f3a0e3faa1 100644 --- a/lib/zin/wg/formbase/v1.php +++ b/lib/zin/wg/formbase/v1.php @@ -31,6 +31,10 @@ class formBase extends wg 'ajax?:array' // Ajax 表单选项 ); + protected static array $defineBlocks = array( + 'actions' => array('toolbar') + ); + protected function created() { if($this->prop('actions') !== null) return; @@ -41,6 +45,8 @@ class formBase extends wg protected function buildActions(): wg|null { + if($this->hasBlock('actions')) return $this->block('actions'); + $actions = $this->prop('actions'); if(empty($actions)) return null;