-
Notifications
You must be signed in to change notification settings - Fork 0
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
3 changed files
with
49 additions
and
24 deletions.
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,21 @@ | ||
# 常用配置 | ||
|
||
<details> | ||
<summary>如何修改 crud 的详情打开的 dialog 的 size</summary> | ||
在对应的 controller 中添加以下配置 | ||
<pre> | ||
/** | ||
* @inheritdoc | ||
*/ | ||
protected function gridActionsConfig(): array | ||
{ | ||
return [ | ||
'schema_detail' => [ | ||
'dialog' => [ | ||
'size' => 'lg', | ||
], | ||
], | ||
]; | ||
} | ||
</pre> | ||
</details> |
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,23 @@ | ||
# 多应用支持 | ||
|
||
1. 复制一份 `config/plugin/webman-tech/amis-admin/amis.php` 到 `config/plugin/webman-tech/amis-admin/amis-user.php` | ||
|
||
2. 继承 `AmisModuleChangeMiddleware` 实现一个无 `__construct` 的中间件(因为 webman 目前还不支持中间件注册使用 __construct),例如: | ||
|
||
```php | ||
<?php | ||
|
||
namespace app\middleware; | ||
|
||
use WebmanTech\AmisAdmin\Middleware\AmisModuleChangeMiddleware; | ||
|
||
class AmisModuleChange2User extends AmisModuleChangeMiddleware | ||
{ | ||
public function __construct() | ||
{ | ||
parent::__construct('amis-user'); | ||
} | ||
} | ||
``` | ||
|
||
3. 在相应的路由或全局中间件中引入 `AmisModuleChange2User` |