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-
31## 公共方法
42
53每个组件都可以设置` class ` 和` style `
@@ -10,7 +8,7 @@ style(['width'=>'100px']);
108```
119## 展示组件
1210
13- ### 步骤条
11+ ## Steps 步骤条
1412
1513引导用户按照流程完成任务的分步导航条,可根据实际应用场景设定步骤,步骤不得少于 2 步。
1614
@@ -52,7 +50,15 @@ Steps::make()
5250Html::make()->html("<div >......</div >");
5351```
5452
53+ ### Alert警告
54+
55+ 用于页面中展示重要的提示信息。
56+
57+ ```
58+ Alert::make("title","desc");
59+ ```
5560
61+ 属性请查看 https://element.eleme.cn/#/zh-CN/component/alert
5662
5763## 表格组件
5864
Original file line number Diff line number Diff line change 22
33namespace DummyNamespace;
44
5- use SmallRuralDog\Admin\Components\Text ;
5+ use SmallRuralDog\Admin\Components\Alert ;
66use SmallRuralDog\Admin\Controllers\AdminController;
77use SmallRuralDog\Admin\Layout\Content;
8+ use SmallRuralDog\Admin\Layout\Row;
89
910class HomeController extends AdminController
1011{
1112
1213
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+ });
1626 return $content;
1727 }
1828}
Original file line number Diff line number Diff line change @@ -28,15 +28,18 @@ public function body($content)
2828 }
2929
3030
31- public function row ($ content )
31+ public function row ($ content, $ gutter = 0 )
3232 {
3333
3434 if ($ content instanceof Closure) {
3535 $ row = new Row ();
36+ $ row ->gutter ($ gutter );
3637 call_user_func ($ content , $ row );
3738 $ this ->addRow ($ row );
3839 } else {
39- $ this ->addRow (new Row ($ content ));
40+ $ row = new Row ();
41+ $ row ->gutter ($ gutter );
42+ $ this ->addRow ($ row );
4043 }
4144 return $ this ;
4245 }
You can’t perform that action at this time.
0 commit comments