<template>
|
<nut-button class="bole-float-button" plain type="primary" :style="{ bottom: `${bottom}px` }">
|
<img :src="icon" class="bole-float-button-icon" />
|
<div class="bole-float-button-text">{{ text }}</div>
|
</nut-button>
|
</template>
|
|
<script setup lang="ts">
|
import IconAdd from '@/assets/order/icon-note.png';
|
import { useSystemStore } from '@/stores/modules/system';
|
|
defineOptions({
|
name: 'FloatButton',
|
});
|
|
type Props = {
|
text?: string;
|
icon?: string;
|
};
|
|
const props = withDefaults(defineProps<Props>(), {
|
icon: IconAdd,
|
});
|
|
const systemStore = useSystemStore();
|
|
const bottom = computed(() => systemStore.bottomNavHeight + systemStore.IPhoneXPadding + 60);
|
</script>
|
|
<style lang="scss">
|
@import '@/styles/common.scss';
|
|
:root,
|
page {
|
.bole-float-button {
|
position: fixed;
|
height: 56px;
|
right: 20px;
|
font-size: 0;
|
padding: 0 20px;
|
background-color: #484d61 !important;
|
border: none;
|
|
.nut-button__warp {
|
& > div {
|
font-size: 0;
|
}
|
}
|
|
.bole-float-button-icon {
|
width: 28px;
|
height: 28px;
|
display: inline-block;
|
vertical-align: middle;
|
margin-right: 4px;
|
}
|
|
.bole-float-button-text {
|
display: inline-block;
|
font-size: 24px;
|
line-height: 1;
|
vertical-align: middle;
|
color: #fff;
|
}
|
}
|
}
|
</style>
|