main.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <view class="screen_all">
  3. <view class="screen_all" @click="open">
  4. <slot></slot>
  5. </view>
  6. <view
  7. class="address-picker flex"
  8. :class="[show?'picker-show':'picker-hide']"
  9. >
  10. <view @click="cancel" class="flex-1"></view>
  11. <view class="address-picker-bottom"
  12. :class="[show?'bottom-show':'bottom-hide']"
  13. >
  14. <view class="address-picker-header row">
  15. <view @click="cancel" class="address-picker-control address-picker-cancel center">取消</view>
  16. <view class="flex-all-1"></view>
  17. <view @click="confirm" class="address-picker-control address-picker-confirm center">确定</view>
  18. </view>
  19. <view class="address-picker-content">
  20. <picker-view
  21. :value="vValue"
  22. class="picker-view"
  23. @change="changeColumn"
  24. >
  25. <picker-view-column>
  26. <view class="picker-column flex jCenter" v-for="(item,index) in province" :key="index"><view class="picker-view-line-1">{{item.name}}</view></view>
  27. </picker-view-column>
  28. <picker-view-column>
  29. <view class="picker-column flex jCenter" v-for="(item,index) in city" :key="index"><view class="picker-view-line-1">{{item.name}}</view></view>
  30. </picker-view-column>
  31. <picker-view-column>
  32. <view class="picker-column flex jCenter" v-for="(item,index) in area" :key="index"><view class="picker-view-line-1">{{item.name}}</view></view>
  33. </picker-view-column>
  34. </picker-view>
  35. </view>
  36. <!-- iphoneX的兼容 -->
  37. <view :style="{height: footerHeight+'px'}"></view>
  38. </view>
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. import mixins from './mixins/index';
  44. import props from "./props";
  45. export default {
  46. name: "address-picker",
  47. mixins,
  48. props
  49. }
  50. </script>
  51. <style scoped src="./style.scss" lang="scss">
  52. </style>