wupengfei
2025-02-14 9486476bd79bb3bc6eeef2b1b69e6222fcd18b00
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<template>
  <NavBar v-bind="props" class="large-title-navigation-bar">
    <div :class="['large-title-navigation-bar-wrapper']" :style="barStyle">
      <slot name="title">
        <span class="large-title-navigation-bar-title">{{ title }}</span>
      </slot>
    </div>
  </NavBar>
</template>
 
<script setup lang="ts">
import NavBar from './NavBar.vue';
import { commonNavigationBarProps } from './commonNavigationBar';
import { useSystemStore } from '@/stores/modules/system';
import { CSSProperties } from 'vue';
// import Taro from '@tarojs/taro';
 
defineOptions({
  name: 'LargeTitleNavigationBar',
});
 
const systemStore = useSystemStore();
 
const props = defineProps(commonNavigationBarProps);
 
const barStyle = computed(() => {
  const distance = systemStore.menuButtonWidth + systemStore.menuButtonRightDistance + 4;
  return {
    // paddingLeft: `${distance}px`,
    paddingRight: `${distance}px`,
    height: systemStore.navigationBarHeight + 'px',
  } as CSSProperties;
});
</script>
 
<style lang="scss">
@import '@/styles/common.scss';
 
.large-title-navigation-bar {
  background-color: transparent;
  position: relative;
  z-index: 1;
}
 
.large-title-navigation-bar-wrapper {
  width: 100%;
  line-height: 1;
  font-size: 40px;
  color: #fff;
  min-width: 0;
  position: relative;
  align-items: center;
  display: flex;
  font-weight: bold;
  padding-left: 30px;
 
  .large-title-navigation-bar-title {
    @include ellipsis;
  }
}
</style>