<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>