mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-04 13:07:55 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			33 lines
		
	
	
		
			593 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			593 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
<template>
 | 
						|
  <button class="back-button" @click.capture="goBack">
 | 
						|
    <fluent-icon icon="chevron-left" />
 | 
						|
    {{ buttonLabel || $t('GENERAL_SETTINGS.BACK') }}
 | 
						|
  </button>
 | 
						|
</template>
 | 
						|
<script>
 | 
						|
import router from '../../routes/index';
 | 
						|
 | 
						|
export default {
 | 
						|
  props: {
 | 
						|
    backUrl: {
 | 
						|
      type: [String, Object],
 | 
						|
      default: '',
 | 
						|
    },
 | 
						|
    buttonLabel: {
 | 
						|
      type: String,
 | 
						|
      default: '',
 | 
						|
    },
 | 
						|
  },
 | 
						|
  methods: {
 | 
						|
    goBack() {
 | 
						|
      if (this.backUrl !== '') {
 | 
						|
        router.push(this.backUrl);
 | 
						|
      } else {
 | 
						|
        router.go(-1);
 | 
						|
      }
 | 
						|
    },
 | 
						|
  },
 | 
						|
};
 | 
						|
</script>
 | 
						|
<style scoped></style>
 |