作者 xiaoqiu

修改了应用类型的上级菜单

import { createWebHistory, createRouter } from 'vue-router'
import { createWebHashHistory, createRouter } from 'vue-router'
/* Layout */
import Layout from '@/layout'
... ... @@ -161,7 +161,7 @@ export const dynamicRoutes = [
]
const router = createRouter({
history: createWebHistory(),
history: createWebHashHistory(),
routes: constantRoutes,
scrollBehavior(to, from, savedPosition) {
if (savedPosition) {
... ...
... ... @@ -159,7 +159,7 @@
<el-tree-select
v-model="form.parentId"
:data="menuOptions"
:props="{ value: 'id', label: 'label', children: 'children' }"
:props="{ value: 'id', label: 'name', children: 'children' }"
value-key="id"
placeholder="选择上级分类"
check-strictly
... ... @@ -346,9 +346,9 @@ function resetQuery() {
/** 查询菜单下拉树结构 */
function getTypeTreeSelect() {
menuOptions.value = [];
getTreeTypeList().then((response) => {
const menu = { id: 0, label: "主类目", children: [] };
menu.children = response.data;
getTypeList().then((response) => {
const menu = { id: 0, name: "主类目", children: [] };
menu.children = proxy.handleTree(response.data, "id");
menuOptions.value.push(menu);
});
}
... ...
... ... @@ -2,7 +2,8 @@ import { defineConfig, loadEnv } from 'vite'
import path from 'path'
import createVitePlugins from './vite/plugins'
const baseUrl = 'http://htai.toolsai.cc/' // 后端接口
// const baseUrl = 'http://htai.aiboxgo.com/' // 后端接口
const baseUrl = 'http://192.168.2.15:35273/' // 后端接口
// https://vitejs.dev/config/
export default defineConfig(({ mode, command }) => {
... ...