fix bug menu ordering

This commit is contained in:
Geriano
2022-07-22 08:04:43 +07:00
parent e2b42aef06
commit 310cc88881
3 changed files with 8 additions and 4 deletions

View File

@@ -1,10 +1,11 @@
<script setup>
import { getCurrentInstance, ref } from 'vue'
import { getCurrentInstance, onMounted, ref } from 'vue'
import axios from 'axios'
import { usePage } from '@inertiajs/inertia-vue3'
import Builder from './Sidebar/Builder.vue'
import Icon from '@/Components/Icon.vue'
import Swal from 'sweetalert2'
import { Inertia } from '@inertiajs/inertia'
const self = getCurrentInstance()
const menus = ref(usePage().props.value.$menus || [])
@@ -27,7 +28,9 @@ const fetch = async () => {
}
}
fetch()
Inertia.on('finish', () => fetch())
onMounted(fetch)
</script>
<style scoped>