import { defineStore } from 'pinia' import { get, omit } from 'lodash' import { AxiosWrapper } from '@/utils/axios-wrapper' const axios = new AxiosWrapper() export const MenuStore = defineStore('menu', () => { const listRoutes = async (payload) => { const type = get(payload, 'type') const np = omit(payload, 'type') const res = await axios.$post(`/menu/${type}`, np) return res } return { listRoutes } })