敢为人鲜小程序前端代码仓库
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.

41 lines
820 B

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <view>
  3. <cityPicker :column="column" :default-value="defaultValue" :mask-close-able="maskCloseAble" @confirm="confirm"
  4. @cancel="cancel" :visible="visible" />
  5. </view>
  6. </template>
  7. <script>
  8. import cityPicker from '@/uni_modules/piaoyi-cityPicker/components/piaoyi-cityPicker/piaoyi-cityPicker'
  9. export default {
  10. data() {
  11. return {
  12. visible: false,
  13. maskCloseAble: true,
  14. defaultValue: '110000',
  15. // defaultValue: ['河北省','唐山市','丰南区'],
  16. column: 3
  17. }
  18. },
  19. components: {
  20. cityPicker
  21. },
  22. methods: {
  23. open() {
  24. this.visible = true
  25. },
  26. confirm(val) {
  27. this.$emit('select', `${val.provinceName}-${val.cityName}-${val.areaName}`)
  28. this.visible = false
  29. },
  30. cancel() {
  31. this.visible = false
  32. }
  33. }
  34. }
  35. </script>
  36. <style lang="scss">
  37. </style>