File tree Expand file tree Collapse file tree 3 files changed +28
-9
lines changed Expand file tree Collapse file tree 3 files changed +28
-9
lines changed Original file line number Diff line number Diff line change 1
- # 内置组件
2
-
3
1
## 公共方法
4
2
5
3
每个组件都可以设置` class ` 和` style `
@@ -10,7 +8,7 @@ style(['width'=>'100px']);
10
8
```
11
9
## 展示组件
12
10
13
- ### 步骤条
11
+ ## Steps 步骤条
14
12
15
13
引导用户按照流程完成任务的分步导航条,可根据实际应用场景设定步骤,步骤不得少于 2 步。
16
14
@@ -52,7 +50,15 @@ Steps::make()
52
50
Html::make()->html("<div >......</div >");
53
51
```
54
52
53
+ ### Alert警告
54
+
55
+ 用于页面中展示重要的提示信息。
56
+
57
+ ```
58
+ Alert::make("title","desc");
59
+ ```
55
60
61
+ 属性请查看 https://element.eleme.cn/#/zh-CN/component/alert
56
62
57
63
## 表格组件
58
64
Original file line number Diff line number Diff line change 2
2
3
3
namespace DummyNamespace;
4
4
5
- use SmallRuralDog\Admin\Components\Text ;
5
+ use SmallRuralDog\Admin\Components\Alert ;
6
6
use SmallRuralDog\Admin\Controllers\AdminController;
7
7
use SmallRuralDog\Admin\Layout\Content;
8
+ use SmallRuralDog\Admin\Layout\Row;
8
9
9
10
class HomeController extends AdminController
10
11
{
11
12
12
13
13
- public function index(Content $content)
14
- {
15
- $content->body(Text::make("欢迎使用!!!"));
14
+ public function index(Content $content){
15
+ $content->className('m-10')
16
+ ->row(function (Row $row) {
17
+ $row->gutter(20);
18
+ $row->column(12, Alert::make("你好,同学!!", "欢迎使用 laravel-vue-admin")->showIcon()->closable(false)->type("success"));
19
+ $row->column(12, Alert::make("你好,同学!!", "欢迎使用 laravel-vue-admin")->showIcon()->closable(false)->type("error"));
20
+ })->row(function (Row $row) {
21
+ $row->gutter(20);
22
+ $row->className('mt-10');
23
+ $row->column(12, Alert::make("你好,同学!!", "欢迎使用 laravel-vue-admin")->showIcon()->closable(false)->type("info"));
24
+ $row->column(12, Alert::make("你好,同学!!", "欢迎使用 laravel-vue-admin")->showIcon()->closable(false)->type("warning"));
25
+ });
16
26
return $content;
17
27
}
18
28
}
Original file line number Diff line number Diff line change @@ -28,15 +28,18 @@ public function body($content)
28
28
}
29
29
30
30
31
- public function row ($ content )
31
+ public function row ($ content, $ gutter = 0 )
32
32
{
33
33
34
34
if ($ content instanceof Closure) {
35
35
$ row = new Row ();
36
+ $ row ->gutter ($ gutter );
36
37
call_user_func ($ content , $ row );
37
38
$ this ->addRow ($ row );
38
39
} else {
39
- $ this ->addRow (new Row ($ content ));
40
+ $ row = new Row ();
41
+ $ row ->gutter ($ gutter );
42
+ $ this ->addRow ($ row );
40
43
}
41
44
return $ this ;
42
45
}
You can’t perform that action at this time.
0 commit comments