Skip to content

Commit df0e214

Browse files
author
hikki
committed
v3.7 bug
1 parent a68295b commit df0e214

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

resources/assets/component.css

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,14 +290,18 @@
290290
.dlp-input:focus,.dlp-form-row>textarea:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}
291291
.dlp-form-row{
292292
display: flex;
293-
justify-content:center;
293+
justify-content:left;
294294
align-items: baseline;
295-
padding: 10px 3em 5px 10px;
295+
margin: 10px 3em 5px 10px;
296+
border: 1px solid #ebebeb;
296297
}
297298
.dlp-form-row>input,.dlp-form-row>textarea{
298299
flex: auto;
299300
color: #0c0c0c;
300301
}
302+
.dlp-form-row>textarea{
303+
height: auto!important;
304+
}
301305
.dlp-form-row>label{
302306
min-width: 7em!important;
303307
max-width: 7em!important;
@@ -360,7 +364,7 @@
360364
vertical-align: bottom;
361365
}
362366
#dlp-plane .plane-body,.dot-cascade-panel>.plane-body{
363-
background-color: rgb(244, 244, 244);
367+
background-color: #ffffff;
364368
padding: 0;
365369
overflow-y: auto;
366370
border-radius: 0 0 3px 3px;

src/Tool/FormPanel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function hidden(string $column, string $value)
4343
public function textarea(string $column, string $label, string $value = '')
4444
{
4545
$content = <<<EOF
46-
<textarea name="{$column}" class="{$column}" rows="3" placeholder="输入 {$label}">{$value}</textarea>
46+
<textarea name="{$column}" class="dlp-input" rows="3" placeholder="输入 {$label}">{$value}</textarea>
4747
EOF;
4848
$this->html .= $this->rowpanel($column, $label, $content);
4949
}
@@ -65,7 +65,7 @@ public function select(string $column, string $label, array $select, array $sele
6565
{
6666
$selected = json_encode($selected, JSON_UNESCAPED_UNICODE | JSON_HEX_QUOT | JSON_HEX_APOS);
6767
$select = json_encode($select, JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE | JSON_HEX_QUOT | JSON_HEX_APOS);
68-
$setting = array_merge(['mode'=>false,'placeholder'=>'请选择','width' => '100%','height'=>'200px','menu_height'=>'150px'], $setting);
68+
$setting = array_merge(['mode'=>true,'placeholder'=>'请选择','width' => '100%','height'=>'200px','menu_height'=>'150px'], $setting);
6969
$style = $setting['mode'] === true ? "witdh:{$setting['width']};" : "witdh:{$setting['width']};height:{$setting['height']}";
7070

7171
$menu = json_encode(['mode'=>$setting['mode'],'placeholder'=>$setting['placeholder'],'height'=>$setting['menu_height']]);

test/example.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public function blank()
214214
$panel = new FormPanel();
215215
$panel->input('id','序号');
216216
$panel->textarea('description','描述');
217-
$panel->select('status','状态',[0],[0=>'开启',1=>'关闭',2=>'删除'],1);
217+
$panel->select('status','状态',[0=>'开启',1=>'关闭',2=>'删除'],[0],1);
218218
$panel->datepicker('time','时间');
219219
$panel->html('test','自定义html','<p>松下紗栄子</p>');
220220
/*多图上传样例*/

0 commit comments

Comments
 (0)