Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
z-song authored May 30, 2019
1 parent dad1b47 commit 94684e8
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@ php artisan vendor:publish --tag=laravel-admin-china-distpicker
$form->distpicker(['province_id', 'city_id', 'district_id']);
```

设置默认值
```php

$form->distpicker([
'province_id' => '省份',
'city_id' => '市',
'district_id' => '区'
], '地域选择')->default([
'province' => 130000,
'city' => 130200,
'district' => 130203,
]);
```

可以设置每个字段的placeholder

```php
Expand All @@ -67,11 +81,6 @@ $form->distpicker(['province_id', 'city_id', 'district_id'])->autoselect(1);

```

表单提交的时候,默认是使用`地域名称`作为表单值提交,如果你要提交`地域编码`,使用下面的方法:
```php
$form->distpicker(['province_id', 'city_id', 'district_id'])->attribute('data-value-type', 'code');
```

### 表格筛选中使用

```php
Expand Down

0 comments on commit 94684e8

Please sign in to comment.