Titlenav.vue 957 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <view :style="{ paddingTop: `${systemInfo.statusBarHeight}px` }">
  3. <view class="paddingTop">
  4. <image
  5. @click="navigateBack()"
  6. class="topImg"
  7. :src="`https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/image/${flag ? '2021-09-28-10-13-29pAQbyKoL.png' : '2021-09-24-17-12-18wIDpEwbr.png'}`"
  8. mode="widthFix"
  9. ></image>
  10. <span class="title"><slot></slot></span>
  11. <view class="white"></view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. import { mapState } from 'vuex';
  17. export default {
  18. computed: {
  19. ...mapState(['systemInfo'])
  20. },
  21. props:{
  22. flag:{
  23. type:Boolean,
  24. default:false
  25. }
  26. }
  27. };
  28. </script>
  29. <style lang="scss" scoped>
  30. .paddingTop {
  31. height: 44px;
  32. display: flex;
  33. align-items: center;
  34. justify-content: space-between;
  35. .topImg {
  36. width: 28px;
  37. height: 28px;
  38. margin-left: 8px;
  39. }
  40. .title {
  41. font-size: 18px;
  42. font-weight: bold;
  43. color: #000000;
  44. line-height: 25px;
  45. }
  46. .white {
  47. width: 33px;
  48. }
  49. }
  50. </style>