feat: add vue3(element-plus)

This commit is contained in:
xingyu
2022-07-18 19:06:37 +08:00
parent c6b58dca52
commit 80a3ae8d74
423 changed files with 41039 additions and 0 deletions

View File

@ -0,0 +1,31 @@
import { defHttp } from '@/config/axios'
import type { MenuVO } from './types'
// 查询菜单(精简)列表
export const listSimpleMenusApi = () => {
return defHttp.get({ url: '/system/menu/list-all-simple' })
}
// 查询菜单列表
export const getMenuListApi = (params) => {
return defHttp.get({ url: '/system/menu/list', params })
}
// 获取菜单详情
export const getMenuApi = (id: number) => {
return defHttp.get<MenuVO>({ url: '/system/menu/get?id=' + id })
}
// 新增菜单
export const createMenuApi = (params: MenuVO) => {
return defHttp.post({ url: '/system/menu/create', params })
}
// 修改菜单
export const updateMenuApi = (params: MenuVO) => {
return defHttp.put({ url: '/system/menu/update', params })
}
// 删除菜单
export const deleteMenuApi = (id: number) => {
return defHttp.delete({ url: '/system/menu/delete?id=' + id })
}

View File

@ -0,0 +1,15 @@
export type MenuVO = {
id: number
name: string
permission: string
type: number
sort: number
parentId: number
path: string
icon: string
component: string
status: number
visible: boolean
keepAlive: boolean
createTime: string
}