-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# 升级指南 | ||
|
||
##### 升级至v2.0.0版本 | ||
|
||
+ 修改模态框表单,需要使用 bindFormBuilder 方法显示绑定 FormBuilder 对象 | ||
```php | ||
// 旧版本写法 | ||
protected function buildAddModal(){ | ||
$modal = (new \Qs\ModalButton\ModalButtonBuilder()); | ||
// 省略其他代码 | ||
return $modal->setBody($this->add()); | ||
} | ||
|
||
public function add(){ | ||
$builder = new FormBuilder(); | ||
// 省略其他代码 | ||
return $builder->build(true); | ||
} | ||
``` | ||
```php | ||
// v2版本 | ||
protected function buildAddModal(){ | ||
$modal = (new \Qs\ModalButton\ModalButtonBuilder()); | ||
// 省略其他代码 | ||
return $modal->bindFormBuilder($this->add()); | ||
} | ||
|
||
public function add(){ | ||
$builder = new FormBuilder(); | ||
// 省略其他代码 | ||
return $builder; | ||
} | ||
``` | ||
+ 废弃 setIsForward 方法提示,可用 setIsJump 方法替换 |