Skip to content

Commit

Permalink
Vue表单 Vue省市区三级联动选择组件 sweetalert插件
Browse files Browse the repository at this point in the history
  • Loading branch information
prohorry-me committed Aug 23, 2018
1 parent 895f664 commit 859c650
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions laravel/laravel5/3.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,14 @@
# 在 windows.homestead 中用 Yarn 都得加参数 --no-bin-links
```
-----------------------------------------------------------------------------
* 用 Vue 弄一个表单组件 resources/assets/js/components/UserAddressesCreateAndEdit.js [详情参考]()
* 用 Vue 弄一个表单组件 resources/assets/js/components/UserAddressesCreateAndEdit.js [详情参考](https://github.com/prohorry-me/laravel-shop/blob/master/resources/assets/js/components/UserAddressesCreateAndEdit.js)
> 里面就三个数据:记录省市区(这三个数据和下面的省市区三级联动组件的省市区用Vue `v-model` 关联)
> 同时有一个方法 `onDistrictChanged()` => 监听下面的组件的选择 change 事件 `@change="onDistrictChanged"`
-----------------------------------------------------------------------------
* 用 Vue 搞一个省市区联动的组件
* 装一个叫 [china-area-data](https://github.com/airyland/china-area-data/blob/master/v3/data.js) 的包:里面是放的中国几乎全部省市区的信息
* 新建一个 Vue 组件: resources/assets/js/components/SelectDistrict.js [详情参考]()
* 新建一个 Vue 组件: resources/assets/js/components/SelectDistrict.js [详情参考](https://github.com/prohorry-me/laravel-shop/blob/master/resources/assets/js/components/SelectDistrict.js)
* 编辑 resources/assets/js/app.js
```
...
Expand Down Expand Up @@ -592,4 +592,4 @@
\App\Models\UserAddress::class => \App\Policies\UserAddressPolicy::class, // <= 添加这句
];
```
* 在 UserAddressesController@edit update destroy 中授权 `$this->authorize('own', $user_address);`
* 在 UserAddressesController@edit update destroy 中授权 `$this->authorize('own', $user_address);`

0 comments on commit 859c650

Please sign in to comment.