app-iphonex-bottom.vue 830 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <view class="app-iphone-bottom" :style="{height: iphone ? `50rpx` : '0rpx'}">
  3. </view>
  4. </template>
  5. <script>
  6. import {mapState} from 'vuex';
  7. export default {
  8. name: 'app-iphone-bottom',
  9. props: {
  10. backgroundColor: {
  11. type: String,
  12. default: function() {
  13. return 'white';
  14. }
  15. }
  16. },
  17. computed: {
  18. ...mapState('gConfig',{
  19. iphone: (data) => {
  20. return data.iphone;
  21. },
  22. iphoneHeight: (state) =>{
  23. return state.iphoneHeight;
  24. },
  25. })
  26. }
  27. }
  28. </script>
  29. <style scoped lang="scss">
  30. .app-iphone-bottom {
  31. background-color: white;
  32. width: 100%;
  33. position:fixed;
  34. left: 0;
  35. bottom: 0;
  36. }
  37. </style>