From 3b24ee1ebf37ddf19f270536f75cd7112fcc7b20 Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 21 Jun 2023 15:37:07 +0800 Subject: [PATCH] + formPanel: add formClass prop. --- lib/zin/wg/formpanel/v1.php | 2 ++ module/company/ui/edit.html.php | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/zin/wg/formpanel/v1.php b/lib/zin/wg/formpanel/v1.php index c29cec2c3a..30d8892cd4 100644 --- a/lib/zin/wg/formpanel/v1.php +++ b/lib/zin/wg/formpanel/v1.php @@ -36,6 +36,7 @@ class formPanel extends panel 'class?: string="panel-form rounded-md ring-0 canvas px-4 pb-4 mb-4 mx-auto"', // 类名。 'size?: string="lg"', // 额外尺寸。 'id?: string="$GID"', // ID,如果不指定则自动生成(使用 zin 部件 GID)。 + 'formClass?: string', // 表单样式。 'method?: "get"|"post"="post"', // 表单提交方式。 'url?: string', // 表单提交地址。 'actions?: array', // 表单操作按钮,如果不指定则使用默认行为的 “保存” 和 “返回” 按钮。 @@ -81,6 +82,7 @@ class formPanel extends panel return new form ( + set::class($this->prop('formClass')), set($this->props->pick(array_keys(form::getDefinedProps()))), $this->children() ); diff --git a/module/company/ui/edit.html.php b/module/company/ui/edit.html.php index cd899328c5..8af7fa1a07 100644 --- a/module/company/ui/edit.html.php +++ b/module/company/ui/edit.html.php @@ -12,6 +12,7 @@ namespace zin; formPanel ( + set::formClass('border-0'), set::shadow(false), set::title($company->name), set::headingClass('modal-heading'),