珠宝小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

42 lines
820 B

<template>
<view>
<cityPicker :column="column" :default-value="defaultValue" :mask-close-able="maskCloseAble" @confirm="confirm"
@cancel="cancel" :visible="visible" />
</view>
</template>
<script>
import cityPicker from '@/uni_modules/piaoyi-cityPicker/components/piaoyi-cityPicker/piaoyi-cityPicker'
export default {
data() {
return {
visible: false,
maskCloseAble: true,
defaultValue: '110000',
// defaultValue: ['河北省','唐山市','丰南区'],
column: 3
}
},
components: {
cityPicker
},
methods: {
open() {
this.visible = true
},
confirm(val) {
this.$emit('select', `${val.provinceName}-${val.cityName}-${val.areaName}`)
this.visible = false
},
cancel() {
this.visible = false
}
}
}
</script>
<style lang="scss">
</style>