2019-08-14 09:48:44 +00:00
|
|
|
<template>
|
2021-12-01 05:03:18 +00:00
|
|
|
<button class="back-button" @click.capture="goBack">
|
|
|
|
<fluent-icon icon="chevron-left" />
|
2021-10-25 13:05:58 +00:00
|
|
|
{{ buttonLabel || $t('GENERAL_SETTINGS.BACK') }}
|
2021-12-01 05:03:18 +00:00
|
|
|
</button>
|
2019-08-14 09:48:44 +00:00
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
import router from '../../routes/index';
|
|
|
|
|
|
|
|
export default {
|
2020-06-22 07:49:26 +00:00
|
|
|
props: {
|
|
|
|
backUrl: {
|
|
|
|
type: [String, Object],
|
|
|
|
default: '',
|
|
|
|
},
|
2021-10-25 13:05:58 +00:00
|
|
|
buttonLabel: {
|
|
|
|
type: String,
|
|
|
|
default: '',
|
|
|
|
},
|
2020-06-22 07:49:26 +00:00
|
|
|
},
|
2019-08-14 09:48:44 +00:00
|
|
|
methods: {
|
|
|
|
goBack() {
|
2020-06-22 07:49:26 +00:00
|
|
|
if (this.backUrl !== '') {
|
|
|
|
router.push(this.backUrl);
|
|
|
|
} else {
|
|
|
|
router.go(-1);
|
|
|
|
}
|
2019-08-14 09:48:44 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2020-06-22 07:49:26 +00:00
|
|
|
</script>
|
2021-12-01 05:03:18 +00:00
|
|
|
<style scoped></style>
|