<template>
  <uv-icon name="arrow-left" :size="44" :color="color" @click="goBack" />
</template>

<script>
export default {
  name: 'BackArrow',
  props: {
    size: {
      type: [String, Number],
      default: 56
    },
    color: {
      type: String,
      default: '#333'
    }
  },
  methods: {
    goBack() {
      this.$emit('back');
      if (this.$listeners.back) return;
      if (typeof uni !== 'undefined' && uni.navigateBack) {
        uni.navigateBack();
      }
    }
  }
}
</script> 