iachat/app/javascript/dashboard/routes/dashboard/settings/Wrapper.vue
Pranav Raj S 1083a24a26
fix: Update Re-rendering behaviour for lists in conversation view (#3117)
* fix: Update Re-rendering behaviour for lists in conversation view

* Remove console.log
2021-09-30 15:11:00 +05:30

61 lines
1.2 KiB
Vue

<template>
<div class="view-box columns bg-light">
<settings-header
button-route="new"
:icon="icon"
:header-title="$t(headerTitle)"
:button-text="$t(headerButtonText)"
:show-back-button="showBackButton"
:back-url="backUrl"
:show-new-button="showNewButton"
/>
<keep-alive v-if="keepAlive">
<router-view></router-view>
</keep-alive>
<router-view v-else></router-view>
</div>
</template>
<script>
/* eslint no-console: 0 */
import SettingsHeader from './SettingsHeader';
export default {
components: {
SettingsHeader,
},
props: {
headerTitle: String,
headerButtonText: String,
icon: String,
keepAlive: {
type: Boolean,
default: true,
},
newButtonRoutes: {
type: Array,
default: () => [],
},
showBackButton: {
type: Boolean,
default: false,
},
backUrl: {
type: [String, Object],
default: '',
},
},
data() {
return {};
},
computed: {
currentPage() {
return this.$store.state.route.name;
},
showNewButton() {
return this.newButtonRoutes.length !== 0 && !this.showBackButton;
},
},
};
</script>