title-status.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <view class="head-status-wrap" :style="{height: hasHeight ? '80rpx' : null}">
  3. <view class="head-status" :style="{backgroundColor: bgColor || null}">
  4. <view>{{ date2TimeStr }}</view>
  5. <view>{{ photosSyncStr }}</view>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. import { mapGetters } from 'vuex'
  11. export default {
  12. name:"title-status",
  13. props: {
  14. hasHeight: {
  15. type: Boolean,
  16. default: true
  17. },
  18. bgColor: {
  19. type: String,
  20. default: '#3D7CF7'
  21. }
  22. },
  23. data() {
  24. return {
  25. }
  26. },
  27. computed: {
  28. ...mapGetters(['date2TimeStr', 'photosSyncStr'])
  29. },
  30. methods: {
  31. }
  32. }
  33. </script>
  34. <style scoped>
  35. .head-status-wrap {
  36. position: relative;
  37. width: 100%;
  38. background-color: transparent;
  39. }
  40. .head-status {
  41. background-color: transparent;
  42. width: calc(100% - 60rpx);
  43. height: 80rpx;
  44. padding: 0 30rpx;
  45. display: flex;
  46. align-items: center;
  47. justify-content: space-between;
  48. font-size: 30rpx;
  49. font-weight: 400;
  50. color: #FFF;
  51. position: fixed;
  52. top: 0;
  53. left: 0;
  54. z-index: 999;
  55. }
  56. </style>