【前端】纸掌柜h5端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
1.3 KiB

<template>
<view class="qn-footer">
<view
:class="{ 'qn-footer--fixed': fixed, 'qn-footer--shadow': shadow, 'qn-footer--border': border }"
class="qn-footer__content"
:style="{ height: height }"
>
<slot />
</view>
<view class="qn-footer__placeholder" v-if="fixed">
<view class="qn-footer__placeholder-view" :style="{ height: height }" />
</view>
</view>
</template>
<script>
export default {
props: {
fixed: {
type: Boolean,
default: false
},
height: {
type: String,
default: '120rpx'
},
shadow: {
type: Boolean,
default: false
},
border: {
type: Boolean,
default: true
}
}
}
</script>
<style lang="scss" scoped>
.qn-footer__content {
position: relative;
background-color: #fff;
overflow: hidden;
padding: 16rpx 0;
margin-top: 24rpx;
}
.qn-footer--fixed {
position: fixed;
z-index: 10;
bottom: 0;
/* #ifdef H5 */
left: var(--window-left);
right: var(--window-right);
/* #endif */
/* #ifndef H5 */
left: 0;
right: 0;
/* #endif */
}
.qn-footer--shadow {
/* #ifndef APP-NVUE */
box-shadow: 0 -1px 6px #ccc;
/* #endif */
}
.qn-footer--border {
border-top-width: 1rpx;
border-top-style: solid;
border-top-color: #eee;
}
.qn-footer__placeholder-view {
margin-top: 24rpx;
}
</style>