File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 5
5
use DLP \Assembly \Wing ;
6
6
use DLP \Tool \Assistant ;
7
7
use DLP \Widget \Plane ;
8
- use Encore \Admin \Admin ;
9
- use Encore \Admin \Layout \Content ;
10
8
use Illuminate \Http \Request ;
11
9
12
10
/**
16
14
*/
17
15
trait CascadeLineTrait
18
16
{
19
- public function index (Content $ content )
17
+ public function index ()
20
18
{
21
19
try {
22
20
$ this ->migrate ();
@@ -43,7 +41,7 @@ abstract function migrate();
43
41
*/
44
42
abstract function show ($ id );
45
43
46
- public function create (Content $ content )
44
+ public function create ()
47
45
{
48
46
$ wing = new Wing ();
49
47
$ this ->createForm ($ wing );
@@ -75,7 +73,7 @@ public function store()
75
73
*/
76
74
abstract function storeAction (): array ;
77
75
78
- public function edit ($ id, Content $ content )
76
+ public function edit ($ id )
79
77
{
80
78
$ wing = new Wing ();
81
79
$ this ->editForm ($ wing ,$ id );
Original file line number Diff line number Diff line change 4
4
use DLP \Assembly \Wing ;
5
5
use DLP \Tool \Assistant ;
6
6
use DLP \Traits \CascadeLineTrait ;
7
- use Encore \Admin \Controllers \AdminController ;
8
7
use Illuminate \Http \Request ;
9
- use Encore \Admin \Layout \Content ;
10
8
11
- class CascadeLineController extends AdminController
9
+ class CascadeLineController
12
10
{
13
11
/**
14
12
* 实现抽象trait
15
13
*/
16
14
use CascadeLineTrait;
17
15
18
- public function show ($ id, Content $ content )
16
+ public function show ($ id )
19
17
{
20
18
// 节点详情查看页 例子.
21
19
return "详情查看页 " ;
@@ -28,6 +26,7 @@ function createForm(Wing $wing)
28
26
{
29
27
// 节点新增 表单列设置 例子.
30
28
$ wing ->text ('insert_node_val ' )->label ('新增节点 name ' );
29
+ $ wing ->button ('新增提交 ' )->setType ('submit ' )->label ('' );
31
30
return $ wing ->form ();
32
31
}
33
32
@@ -48,12 +47,14 @@ function storeAction()
48
47
/**
49
48
* @inheritDoc
50
49
*/
51
- function editForm ($ id , Wing $ wing )
50
+ function editForm (Wing $ wing, $ id )
52
51
{
53
52
$ request = Request::capture ();
54
53
$ val = $ request ->input ('val ' );
55
54
// 节点修改 表单列设置 例子.
55
+ $ wing ->display ('update_node_id ' )->label ('修改节点 ID ' )->value ($ id );
56
56
$ wing ->text ('update_node_name ' )->label ('修改节点 name ' )->value ($ val );
57
+ $ wing ->button ('提 交 ' )->setType ('submit ' )->label ('' );
57
58
return $ wing ->form ();
58
59
}
59
60
You can’t perform that action at this time.
0 commit comments