qa-prevention-xgf-app/components/fabButton/index.vue

49 lines
907 B
Vue

<template>
<view class="fab_button" @click="handleClick">
<block v-if="type === 'plus'">
<u-icon name="plus" color="#fff" size="28rpx"></u-icon>
</block>
<block v-if="type === 'search'">
<u-icon name="search" color="#fff" size="28rpx"></u-icon>
</block>
<block v-if="type === 'scan'">
<u-icon
name="/static/images/scan.png"
color="#fff"
size="28rpx"
></u-icon>
</block>
</view>
</template>
<script>
export default {
props: {
type: {
type: String,
default: 'plus'
}
},
methods: {
handleClick() {
this.$emit('click')
}
}
}
</script>
<style lang="scss" scoped>
.fab_button {
position: fixed;
bottom: 100rpx;
right: 30rpx;
background-color: #3377ff;
border-radius: 50%;
width: 80rpx;
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
}
</style>