page-header.vue 746 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <view class="page_header">
  3. <text class="header_title">{{ schoolName }}</text>
  4. </view>
  5. </template>
  6. <script setup>
  7. import { ref, onMounted } from 'vue';
  8. import { useStore } from 'vuex';
  9. const store = useStore();
  10. const schoolName = ref('');
  11. onMounted(() => {
  12. schoolName.value = store.state.userStore.userInfo.schoolName || '';
  13. });
  14. </script>
  15. <style lang="scss" scoped>
  16. .page_header {
  17. position: fixed;
  18. top: 0;
  19. left: 0;
  20. right: 0;
  21. background-color: #FFFFFF;
  22. padding-top: calc(26rpx + env(safe-area-inset-top));
  23. padding-bottom: 26rpx;
  24. padding-left: 24rpx;
  25. padding-right: 24rpx;
  26. border-bottom: 1rpx solid #F0F0F0;
  27. z-index: 999;
  28. .header_title {
  29. font-size: 44rpx;
  30. font-weight: 600;
  31. color: #333333;
  32. }
  33. }
  34. </style>