From 39596f32248e6f27a9a945c0b4592b0c108c55aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=BF=9C?= <2970639877@qq.com> Date: Tue, 10 Mar 2026 17:13:41 +0800 Subject: [PATCH] =?UTF-8?q?3.10=E5=8F=B7=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/menu.ts | 2 +- src/router/index.ts | 2 +- src/views/system/menuManagement/index.vue | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/modules/menu.ts b/src/api/modules/menu.ts index b70f4dd..08c082a 100644 --- a/src/api/modules/menu.ts +++ b/src/api/modules/menu.ts @@ -18,7 +18,7 @@ export async function getMenuApi(): Promise { * @param params 菜单表单参数(form-data格式) * @returns Promise */ -export async function addMenuApi(params: MenuFormParams): Promise { +export async function createMenuApi(params: MenuFormParams): Promise { return request.post('/menus/create', params); } diff --git a/src/router/index.ts b/src/router/index.ts index b8c93b3..80ef6de 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -88,7 +88,7 @@ const routes = [ const router = createRouter({ history: createWebHistory(), - routes + routes, }); // 全局前置守卫 diff --git a/src/views/system/menuManagement/index.vue b/src/views/system/menuManagement/index.vue index 24edab4..ab44094 100644 --- a/src/views/system/menuManagement/index.vue +++ b/src/views/system/menuManagement/index.vue @@ -102,7 +102,7 @@ import type { FormInstance, FormRules } from 'element-plus' import { Tools, List, HomeFilled, UserFilled, Platform, BellFilled, GoodsFilled, WarningFilled, Plus } from '@element-plus/icons-vue' -import { getMenuApi, addMenuApi, deleteMenuApi, editMenuApi } from '@/api/modules/menu' +import { getMenuApi, createMenuApi, deleteMenuApi, editMenuApi } from '@/api/modules/menu' import { rules } from './rules' // 定义图标映射表和选择图标选项列表 @@ -214,7 +214,7 @@ const handleSubmitMenu = async () => { try { await menuFormRef.value?.validate() if (dialogType.value === 'add') { - await addMenuApi({ + await createMenuApi({ ...menuForm.value, parent_id: menuForm.value.parentId })