File tree Expand file tree Collapse file tree 3 files changed +49
-24
lines changed Expand file tree Collapse file tree 3 files changed +49
-24
lines changed Original file line number Diff line number Diff line change @@ -50,30 +50,11 @@ Amis 组件的封装,目前仅封装了常用的组件类型和属性, 但 a
50
50
51
51
> 组件支持 Controller 级别和全局(config中)修改默认配置参数
52
52
53
- ### 多应用支持
54
-
55
- 1 . 复制一份 ` config/plugin/webman-tech/amis-admin/amis.php ` 到 ` config/plugin/webman-tech/amis-admin/amis-user.php `
56
-
57
- 2 . 继承 ` AmisModuleChangeMiddleware ` 实现一个无 ` __construct ` 的中间件(因为 webman 目前还不支持中间件注册使用 __ construct),例如:
58
-
59
- ``` php
60
- <?php
61
-
62
- namespace app\middleware;
63
-
64
- use WebmanTech\AmisAdmin\Middleware\AmisModuleChangeMiddleware;
65
-
66
- class AmisModuleChange2User extends AmisModuleChangeMiddleware
67
- {
68
- public function __construct()
69
- {
70
- parent::__construct('amis-user');
71
- }
72
- }
73
- ```
74
-
75
- 3 . 在响应的路由或全局中间件中引入 ` AmisModuleChange2User `
76
-
77
53
## 注意点
78
54
79
55
1 . 如果使用 LaravelValidator,校验 file 时需要安装依赖:` webman-tech/polyfill `
56
+
57
+ ## 其他
58
+
59
+ - [ 多应用支持] ( ./docs/multi_app.md )
60
+ - [ 常用配置] ( ./docs/common_usage.md )
Original file line number Diff line number Diff line change
1
+ # 常用配置
2
+
3
+ <details >
4
+ <summary >如何修改 crud 的详情打开的 dialog 的 size</summary >
5
+ 在对应的 controller 中添加以下配置
6
+ <pre >
7
+ /**
8
+ * @inheritdoc
9
+ */
10
+ protected function gridActionsConfig(): array
11
+ {
12
+ return [
13
+ 'schema_detail' => [
14
+ 'dialog' => [
15
+ 'size' => 'lg',
16
+ ],
17
+ ],
18
+ ];
19
+ }
20
+ </pre >
21
+ </details >
Original file line number Diff line number Diff line change
1
+ # 多应用支持
2
+
3
+ 1 . 复制一份 ` config/plugin/webman-tech/amis-admin/amis.php ` 到 ` config/plugin/webman-tech/amis-admin/amis-user.php `
4
+
5
+ 2 . 继承 ` AmisModuleChangeMiddleware ` 实现一个无 ` __construct ` 的中间件(因为 webman 目前还不支持中间件注册使用 __ construct),例如:
6
+
7
+ ``` php
8
+ <?php
9
+
10
+ namespace app\middleware;
11
+
12
+ use WebmanTech\AmisAdmin\Middleware\AmisModuleChangeMiddleware;
13
+
14
+ class AmisModuleChange2User extends AmisModuleChangeMiddleware
15
+ {
16
+ public function __construct()
17
+ {
18
+ parent::__construct('amis-user');
19
+ }
20
+ }
21
+ ```
22
+
23
+ 3 . 在相应的路由或全局中间件中引入 ` AmisModuleChange2User `
You can’t perform that action at this time.
0 commit comments