adding initial menu
This commit is contained in:
@@ -28,6 +28,7 @@ class MenuController extends Controller
|
||||
'permissions' => Permission::get(),
|
||||
'routes' => array_values($routes),
|
||||
'icons' => $this->icons(),
|
||||
'menus' => $this->get(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,14 +15,14 @@ import ButtonGreen from '@/Components/Button/Green.vue'
|
||||
import ButtonBlue from '@/Components/Button/Blue.vue'
|
||||
|
||||
const self = getCurrentInstance()
|
||||
const { permissions, routes, icons } = defineProps({
|
||||
const props = defineProps({
|
||||
permissions: Array,
|
||||
routes: Array,
|
||||
icons: Array,
|
||||
menus: Array,
|
||||
})
|
||||
|
||||
const a = ref(true)
|
||||
const menus = ref([])
|
||||
const menus = ref(props.menus || [])
|
||||
const search = ref('')
|
||||
const form = useForm({
|
||||
id: null,
|
||||
@@ -132,11 +132,6 @@ const save = () => {
|
||||
|
||||
const esc = e => e.key === 'Escape' && close()
|
||||
|
||||
Inertia.on('finish', () => {
|
||||
a.value = false
|
||||
nextTick(() => a.value = true)
|
||||
})
|
||||
|
||||
onMounted(fetch)
|
||||
onMounted(() => window.addEventListener('keydown', esc))
|
||||
onUnmounted(() => window.removeEventListener('keydown', esc))
|
||||
|
||||
Reference in New Issue
Block a user