Ben Lin
2024-06-18 ebbd788fbb2c0b45d4473798efc57eec8ba74a25
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="prefixCls" :style="{ width: getCalcContentWidth }">
    <div :class="`${prefixCls}__left`">
      <slot name="left"></slot>
    </div>
    <slot></slot>
    <div :class="`${prefixCls}__right`">
      <slot name="right"></slot>
    </div>
  </div>
</template>
<script lang="ts" setup>
  import { useMenuSetting } from '@/hooks/setting/useMenuSetting';
  import { useDesign } from '@/hooks/web/useDesign';
 
  defineOptions({
    name: 'PageFooter',
    inheritAttrs: false,
  });
 
  const { prefixCls } = useDesign('page-footer');
  const { getCalcContentWidth } = useMenuSetting();
</script>
<style lang="less" scoped>
  @prefix-cls: ~'@{namespace}-page-footer';
 
  .@{prefix-cls} {
    display: flex;
    position: fixed;
    z-index: @page-footer-z-index;
    right: 0;
    bottom: 0;
    align-items: center;
    width: 100%;
    padding: 0 24px;
    transition: width 0.2s;
    border-top: 1px solid @border-color-base;
    background-color: @component-background;
    box-shadow:
      0 -6px 16px -8px rgb(0 0 0 / 8%),
      0 -9px 28px 0 rgb(0 0 0 / 5%),
      0 -12px 48px 16px rgb(0 0 0 / 3%);
    line-height: 44px;
 
    &__left {
      flex: 1 1;
    }
  }
</style>