Skip to content

Commit b1e12f7

Browse files
author
hikki
committed
v3
1 parent e2449b3 commit b1e12f7

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

test/CascadeLineController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<?php
22
namespace App\Admin\Controllers;
33

4-
use DLP\CascadeLineAbstract;
54
use DLP\Tool\FormPanel;
5+
use DLP\Traits\CascadeLineTrait;
66
use Illuminate\Http\Request;
77

8-
class CascadeLineController extends CascadeLineAbstract
8+
class CascadeLineController
99
{
10+
use CascadeLineTrait;
1011
/**
1112
* @inheritDoc
1213
*/

test/example.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,13 @@ protected function form($id)
142142
* 链表结构数据辅助组装
143143
* 1.倒排父节点查询
144144
* $select = Model::orderBy('parent_id','DESC')->select('id as key','name as val','parent_id as par')->get()->toArray();
145-
* 2.辅助函数dimension 组装后的结构参考$this->cascadeData()的示例数据
145+
* 2.辅助函数dimension 组装后的$select结构参考$this->cascadeExampleData()返回数据
146146
* DLPHelper::dimension($select);
147147
* checked 已选择 一维数组 值类型integer
148148
* attribute.height 设置高度 默认200px
149149
*/
150150
$form->CascadeDot('cascadeDot','级联标签选择器')
151-
->options($this->cascadeData())
151+
->options($this->cascadeExampleData())
152152
->checked([614,550,543])
153153
->attribute(['height'=>'200px']);
154154

@@ -183,7 +183,7 @@ public function blank()
183183
return Plane::html($html);
184184
}
185185

186-
private function cascadeData()
186+
private function cascadeExampleData()
187187
{
188188
return [
189189
["key" => "3", "val" => "基本", "nodes" => [

0 commit comments

Comments
 (0)