searchPopup.vue 602 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <view>
  3. <u-popup :show="show" :mode='mode' :closeOnClickOverlay='false' >
  4. <view :style="{paddingTop: mode == 'top' ? topHight + 'px' : ''}">
  5. <slot name="list"></slot>
  6. <slot name="operate"></slot>
  7. </view>
  8. </u-popup>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. props: {
  14. mode: {
  15. type: String,
  16. default: ''
  17. }
  18. },
  19. data() {
  20. return {
  21. show: true,
  22. topHight: 20 || 20
  23. }
  24. },
  25. created() {
  26. let app = uni.getSystemInfoSync()
  27. this.topHight = app.statusBarHeight || 20
  28. },
  29. methods: {
  30. }
  31. }
  32. </script>
  33. <style>
  34. </style>