zhengyiming
2025-03-13 d580f043716d30f9617ed7f3f49a7e80d54b9865
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
<template>
  <PageLayout v-bind="props">
    <template #navigationBar>
      <TransparentNavigationBar :title="title" :is-absolute="false"></TransparentNavigationBar>
    </template>
    <template #default>
      <img :src="IconBg" class="common-page-bg" />
      <slot />
    </template>
  </PageLayout>
</template>
 
<script setup lang="ts">
import PageLayout from './PageLayout.vue';
import IconBg from '@/assets/components/icon-page-bg.png';
import TransparentNavigationBar from '../NavigationBar/TransparentNavigationBar.vue';
 
defineOptions({
  name: 'PageLayoutWithBg',
});
 
type Props = {
  title?: string;
};
 
const props = withDefaults(defineProps<Props>(), {});
</script>
 
<style lang="scss" scoped>
@use '@/style/common.scss' as *;
 
.common-page-bg {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  object-fit: cover;
}
</style>