59 lines
1.1 KiB
Vue
59 lines
1.1 KiB
Vue
<template>
|
|
<section class="AiBottomBtn">
|
|
<div class="transport" v-if="$slots.default">
|
|
<slot/>
|
|
</div>
|
|
<u-gap v-else height="112"/>
|
|
<div class="fixed" @click="$u.debounce(()=> $emit('click'),500)" :style="{background}">
|
|
<slot v-if="$slots.default"/>
|
|
<div v-else class="text" :class="{circle}" v-text="text"/>
|
|
</div>
|
|
</section>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "AiBottomBtn",
|
|
props: {
|
|
text: {default: ""},
|
|
circle: Boolean,
|
|
background: {default: "inherit"}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.AiBottomBtn {
|
|
.fixed {
|
|
position: fixed;
|
|
bottom: 0;
|
|
width: 100vw;
|
|
z-index: 202301031019;
|
|
}
|
|
|
|
.text {
|
|
width: 100%;
|
|
font-family: PingFangSC-Medium, PingFang SC;
|
|
line-height: 112px;
|
|
text-align: center;
|
|
font-weight: 500;
|
|
color: #FFFFFF;
|
|
background: #1365DD;
|
|
box-shadow: inset 0px 1px 0px 0px #EEEEEE;
|
|
cursor: pointer;
|
|
|
|
&.circle {
|
|
border-radius: 52px;
|
|
line-height: 80px;
|
|
flex-shrink: 0;
|
|
padding: 0 70px;
|
|
width: auto;
|
|
}
|
|
}
|
|
|
|
.transport {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
</style>
|