| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <template>
- <view class="fixed-bottom-view-placeholder"></view>
- <view
- class="fixed-bottom-view"
- :class="{
- 'fixed-bottom-view-shadow ': shadow,
- 'fixed-bottom-view-hidden': hidden,
- }"
- :style="{
- zIndex,
- background,
- }"
- >
- <slot></slot>
- </view>
- </template>
- <script lang="ts">
- export default {
- props: {
- shadow: Boolean,
- hidden: Boolean,
- background: {
- type: String,
- default: "#ffffff",
- },
- zIndex: {
- type: Number,
- default: 999,
- },
- },
- };
- </script>
- <style lang="scss">
- .fixed-bottom-view {
- position: fixed;
- width: 100%;
- left: 0;
- bottom: 0;
- transition: all 0.3s linear;
- box-sizing: content-box;
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
- }
- .fixed-bottom-view-placeholder {
- box-sizing: content-box;
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
- }
- .fixed-bottom-view-shadow {
- box-shadow: 0px 0px 40rpx 0px rgba(157, 147, 142, 0.36);
- }
- .fixed-bottom-view-hidden {
- transform: translateY(100%);
- }
- </style>
|