Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
新增参数provinceDisable、cityDisable、areaDisable,分开控制省、市、县的禁用
- Loading branch information
Showing
4 changed files
with
85 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<template> | ||
<div class="row"> | ||
<div class="example"> | ||
<h5>Disabled Value</h5> | ||
<div class="example-box"> | ||
<div class="box-left d-flex align-items-baseline"> | ||
<div class="col-md-7"> | ||
<v-distpicker :province="select.province" :city="select.city" :area="select.area" | ||
@province="selectProvince" @city="selectCity" @area="selectArea" | ||
:province-disabled="true" :city-disabled="true"></v-distpicker> | ||
</div> | ||
<div class="content-show col-md-5"> | ||
<pre><code>{{ select }}</code></pre> | ||
</div> | ||
</div> | ||
<div class="box-footer" @click="showCode = !showCode"> | ||
{{ showCode ? 'Hide Code' : 'Show Code' }} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import VDistpicker from '../../../src/Distpicker' | ||
export default { | ||
components: {VDistpicker}, | ||
data() { | ||
return { | ||
showCode: false, | ||
select: {province: 440000, city: '广州市', area: '海珠区'}, | ||
} | ||
}, | ||
methods: { | ||
selectProvince(value) { | ||
this.select.province = value.value | ||
console.log(value); | ||
}, | ||
selectCity(value) { | ||
this.select.city = value.value | ||
console.log(value); | ||
}, | ||
selectArea(value) { | ||
this.select.area = value.value | ||
console.log(value); | ||
}, | ||
}, | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters