zhengyiming
1 天以前 c0bcba49bef43b880978ff63b2ac00f1ba5c5c6a
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
<template>
  <div class="page-layout-container">
    <slot name="bg">
      <img :src="OssAssets.common.CommonPageBg" class="common-page-bg" />
    </slot>
    <PageLayout v-bind="props">
      <template #navigationBar>
        <slot name="navigationBar">
          <TransparentNavigationBar :title="title" :is-absolute="false">
            <template #left>
              <slot name="left"></slot>
            </template>
          </TransparentNavigationBar>
        </slot>
      </template>
      <template #default="{ scrollViewHeight }">
        <slot :scrollViewHeight="scrollViewHeight" />
      </template>
    </PageLayout>
  </div>
</template>
 
<script setup lang="ts">
import PageLayout from './PageLayout.vue';
import TransparentNavigationBar from '../NavigationBar/TransparentNavigationBar.vue';
import _ from 'lodash';
import { OssAssets } from '@/constants';
import { pageLayoutProps } from './layout';
 
defineOptions({
  name: 'PageLayoutWithBg',
});
 
const props = defineProps(pageLayoutProps);
</script>
 
<style lang="scss">
@import '@/styles/common.scss';
 
.common-page-bg {
  position: fixed;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  height: 516px;
  object-fit: cover;
}
</style>