<script setup lang="ts">
import { ref, onMounted, onUnmounted } from 'vue'
import { CaretBottom } from '@element-plus/icons-vue'

const showButton = ref(false)

const props = defineProps({
  target: {
    required: true
  }
})


defineExpose({
  showButton
})

</script>

<template>
  <el-button v-show="showButton" :icon="CaretBottom" circle
             @click="props.target.setScrollTop(99999)"
             class="back_bottom" />
</template>

<style scoped lang="scss">
.back_bottom {
  position: absolute;
  bottom: 12px;
  right: 12px;
  font-size: 20px
}
</style>