<script setup>
import { useUserStore } from '@/store/user'

defineProps({
  bottom: {
    type: [String, Number],
    default: '100'
  }
})
const emit = defineEmits(['click'])

const hasBtnPermission = computed(() => {
  const { isWeibao } = storeToRefs(useUserStore())
  return isWeibao.value
})
</script>

<template>
  <view
    v-show="hasBtnPermission"
    w-120
    h-120
    rounded-full
    right-50
    z-100
    shadow
    f-c-c
    flex-col
    position-fixed
    bg="#4395D5"
    :style="{
      bottom: bottom + 'rpx'
    }"
    @click="emit('click')"
  >
    <up-icon name="plus" size="36" :color="`${'#FFFFFF'}`" />
    <text color="#FFFFFF" mt-4>新建</text>
  </view>
</template>
