Skip to content

Commit afd4972

Browse files
author
hikki
committed
v3.1
1 parent 377eae4 commit afd4972

File tree

5 files changed

+35
-3
lines changed

5 files changed

+35
-3
lines changed

src/Widget/CascadeDot.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ public function render()
2727
return parent::render();
2828
}
2929

30+
/**
31+
* 直接调用ComponentCascadeDot组件
32+
* @param array $selected 已选择id组 [1,2,3...]
33+
* @param array $select 全部选项
34+
* @param int $limit 选择限制数 默认0:无限
35+
* @param array $style 组件样式设置 宽:width 高:height
36+
* @return string
37+
*/
3038
public static function panel(array $selected,array $select,int $limit=1,array $style=[])
3139
{
3240
$selected = json_encode($selected, JSON_UNESCAPED_UNICODE | JSON_HEX_QUOT | JSON_HEX_APOS);

src/Widget/CascadeLine.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ public function render()
2626
return parent::render();
2727
}
2828

29+
/**
30+
* 直接调用ComponentCascadeLine组件
31+
* @param array $select 全部选项
32+
* @param string $xhr ajax接口地址
33+
* @param array $style 组件样式设置 宽:width 高:height
34+
* @return string
35+
*/
2936
public static function panel(array $select,string $xhr,array $style=[])
3037
{
3138
$select = json_encode($select, JSON_UNESCAPED_UNICODE | JSON_HEX_QUOT | JSON_HEX_APOS);

src/Widget/Dot.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ public function render()
2727
return parent::render();
2828
}
2929

30+
/**
31+
* 直接调用ComponentDot组件
32+
* @param array $selected 已选择id组 [1,2,3...]
33+
* @param array $select 全部选项
34+
* @param int $limit 选择限制数 默认0:无限
35+
* @param array $style 组件样式设置 宽:width 高:height
36+
* @return string
37+
*/
3038
public static function panel(array $selected,array $select,int $limit=1,array $style=[])
3139
{
3240
$selected = json_encode($selected, JSON_UNESCAPED_UNICODE | JSON_HEX_QUOT | JSON_HEX_APOS);

src/Widget/Linear.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ public function render()
3939
return parent::render();
4040
}
4141

42+
/**
43+
* 直接调用ComponentLine组件
44+
* @param array $columns 头部字段样式定义
45+
* @param array $data 数据集
46+
* @param array $options 操作列设置 sortable可排序 delete可删除
47+
* @return string
48+
*/
4249
public static function panel(array $columns,array $data,array $options=['sortable' => true, 'delete' => true])
4350
{
4451
$columns = json_encode($columns, JSON_UNESCAPED_UNICODE | JSON_HEX_QUOT | JSON_HEX_APOS);

test/example.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,10 @@ protected function form($id)
127127

128128
/**
129129
* 点组件
130-
* options 设置数据集 一维数组 格式 [value1=>text1,value2=>text2...]
131-
* checked 已选择 一维数组 值类型integer
130+
* options 设置数据集 一维数组 格式 [value1=>text1,value2=>text2...]
131+
* checked 已选择 一维数组 值类型integer
132132
* attribute.height 设置高度 默认200px
133+
* attribute.limit 选择限制数 默认0:无限
133134
*/
134135
$form->Dot('dot','标签选择器')
135136
->options([1=>'松下紗栄子',2=>'上原亜衣',3=>'白石茉莉奈',4=>'美谷朱里',5=>'沖田杏梨',6=>'由愛可奈',7=>'七瀬あいり',8=>'五十嵐星蘭',9=>'仲里紗羽',10=>'波多野結衣'])
@@ -144,8 +145,9 @@ protected function form($id)
144145
* $select = Model::orderBy('par','DESC')->select('id as key','name as val','parent_id as par')->get()->toArray();
145146
* 2.辅助函数dimension 组装后的结构参考$this->cascadeData()的示例数据
146147
* DLPHelper::dimension($select);
147-
* checked 已选择 一维数组 值类型integer
148+
* checked 已选择 一维数组 值类型integer
148149
* attribute.height 设置高度 默认200px
150+
* attribute.limit 选择限制数 默认0:无限
149151
*/
150152
$form->CascadeDot('cascadeDot','级联标签选择器')
151153
->options($this->cascadeData())

0 commit comments

Comments
 (0)