page-header.vue 646 B

123456789101112131415161718192021222324252627282930313233343536
  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: 26rpx 24rpx;
  23. border-bottom: 1rpx solid #F0F0F0;
  24. z-index: 999;
  25. .header_title {
  26. font-size: 44rpx;
  27. font-weight: 600;
  28. color: #333333;
  29. }
  30. }
  31. </style>