2022-10-20 02:15:28 +02:00
|
|
|
<template>
|
2023-06-01 15:02:35 +02:00
|
|
|
<div class="flex grow relative">
|
|
|
|
<ui-tabs v-model="active" :entries="$page.props.setting_menu"></ui-tabs>
|
|
|
|
<slot></slot>
|
|
|
|
</div>
|
2022-10-20 02:15:28 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data: function () {
|
|
|
|
return {
|
2023-06-01 15:02:35 +02:00
|
|
|
innerActive: this.$page.props.setting_menu.findIndex((menu) => menu.is_active),
|
2022-10-20 02:15:28 +02:00
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
active: {
|
|
|
|
get() {
|
|
|
|
return this.innerActive;
|
|
|
|
},
|
2023-06-01 15:02:35 +02:00
|
|
|
set(v) {
|
2022-10-20 02:15:28 +02:00
|
|
|
var _self = this;
|
|
|
|
this.$inertia.visit(this.$page.props.setting_menu[v].url, {
|
2023-06-01 15:02:35 +02:00
|
|
|
onSuccess() {
|
2022-10-20 02:15:28 +02:00
|
|
|
_self.innerActive = v;
|
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|