小说小程序前端代码仓库(小程序)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
501 B

  1. <template>
  2. <uv-icon name="arrow-left" :size="44" :color="color" @click="goBack" />
  3. </template>
  4. <script>
  5. export default {
  6. name: 'BackArrow',
  7. props: {
  8. size: {
  9. type: [String, Number],
  10. default: 56
  11. },
  12. color: {
  13. type: String,
  14. default: '#333'
  15. }
  16. },
  17. methods: {
  18. goBack() {
  19. this.$emit('back');
  20. if (this.$listeners.back) return;
  21. if (typeof uni !== 'undefined' && uni.navigateBack) {
  22. uni.navigateBack();
  23. }
  24. }
  25. }
  26. }
  27. </script>