Skip to content

Commit 5b177ee

Browse files
committed
表单布局优化
1 parent 71a63d1 commit 5b177ee

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/Form/FormItem.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ public function componentRightComponent($component)
196196
* 设置底部组件
197197
* @param $component
198198
* @return $this
199+
* @deprecated
199200
*/
200201
public function footerComponent($component)
201202
{
@@ -207,6 +208,21 @@ public function footerComponent($component)
207208
return $this;
208209
}
209210

211+
/**
212+
* 设置底部组件
213+
* @param $component
214+
* @return $this
215+
*/
216+
public function bottomComponent($component)
217+
{
218+
if ($component instanceof \Closure) {
219+
$this->footerComponent = call_user_func($component);
220+
} else {
221+
$this->footerComponent = $component;
222+
}
223+
return $this;
224+
}
225+
210226
/**
211227
* 设置组件
212228
* @param $component

0 commit comments

Comments
 (0)