app-iphone-x.vue 870 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <view class="app-iphone-x">
  3. <slot name="empty-area"></slot>
  4. <view class="x-line" v-if="getBoolEmpty.XBoolean" :style="{height: getBoolEmpty.emptyHeight + 'rpx', backgroundColor: backgroundColor,}"></view>
  5. </view>
  6. </template>
  7. <script>
  8. import { mapGetters } from 'vuex';
  9. export default {
  10. name: "app-iphone-x",
  11. props: {
  12. backgroundColor: {
  13. type: String,
  14. default: function() {
  15. return 'white';
  16. }
  17. }
  18. },
  19. computed: {
  20. ...mapGetters('iPhoneX', {
  21. getBoolEmpty: 'getBoolEmpty'
  22. }),
  23. }
  24. }
  25. </script>
  26. <style scoped lang="scss">
  27. .app-iphone-x {
  28. position: fixed;
  29. bottom: 0;
  30. left: 0;
  31. width: 100%;
  32. z-index: 1500;
  33. }
  34. .x-line {
  35. width: 100%;
  36. background-color: pink;
  37. }
  38. </style>