2022-10-20 02:15:28 +02:00
|
|
|
<template>
|
2023-06-01 15:02:35 +02:00
|
|
|
<div class="flex grow relative">
|
2024-08-01 17:30:55 +02:00
|
|
|
<ui-menulist v-model="active" :entries="$page.props.settingMenu"></ui-menulist>
|
2023-06-01 15:02:35 +02:00
|
|
|
<slot></slot>
|
|
|
|
</div>
|
2022-10-20 02:15:28 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data: function () {
|
|
|
|
return {
|
2024-08-01 17:30:55 +02:00
|
|
|
innerActive: this.$page.props.settingMenu.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;
|
2024-08-01 17:30:55 +02:00
|
|
|
this.$inertia.visit(this.$page.props.settingMenu[v].url, {
|
2023-06-01 15:02:35 +02:00
|
|
|
onSuccess() {
|
2022-10-20 02:15:28 +02:00
|
|
|
_self.innerActive = v;
|
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|