菜单树结构
This commit is contained in:
parent
7ab7b08a9a
commit
cfa91d41bd
@ -5,9 +5,11 @@ ENV = 'development'
|
||||
VITE_BASE_PATH = './'
|
||||
|
||||
# 代理配置(开发使用),必须在一行中
|
||||
|
||||
# 本地
|
||||
# VITE_APP_PROXY=[["/api","http://192.168.130.12:8080/api"]]
|
||||
VITE_APP_PROXY=[["/api","https://test.jsspisoft.com/api"]]
|
||||
# 线上
|
||||
VITE_APP_PROXY=[["/api","http://192.168.109.195:8080/api"]]
|
||||
|
||||
|
||||
|
||||
# 开发环境下跨域代理,请输入要跨域的api地址 - 尾部无需带'/'
|
||||
|
@ -270,14 +270,19 @@ const props = {
|
||||
|
||||
const loadNode = (node: Node, resolve: (data: Tree[]) => void) => {
|
||||
if (node.level === 0) {
|
||||
return resolve([])
|
||||
}
|
||||
if (node.level > 1) return resolve([])
|
||||
|
||||
setTimeout(() => {
|
||||
const data: Tree[] = []
|
||||
|
||||
resolve(data)
|
||||
}, 500)
|
||||
const fromParameter = {
|
||||
parentMenuId: node.data.id,
|
||||
recursive: false,
|
||||
}
|
||||
menusTree(fromParameter)
|
||||
.then((res: any) => {
|
||||
return resolve(res.data)
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
// 菜单搜索查询
|
||||
const input2 = ref('')
|
||||
|
Loading…
Reference in New Issue
Block a user