Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-resource
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-resource
Commits
1824e960
提交
1824e960
authored
7月 05, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: 修改左侧菜单题库管理和试卷管理的跳转地址
上级
ac3ddde5
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
42 行增加
和
9 行删除
+42
-9
menus.ts
src/assets/menus.ts
+20
-6
Aside.vue
src/components/layout/Aside.vue
+22
-3
没有找到文件。
src/assets/menus.ts
浏览文件 @
1824e960
import
type
{
IMenuItem
}
from
'@/types'
import
{
Expand
,
Document
,
VideoCamera
,
Suitcase
,
Collection
,
Files
,
Monitor
,
Edit
,
User
,
Filter
,
Coordinate
,
Notebook
,
Picture
}
from
'@element-plus/icons-vue'
import
{
FolderOpened
,
ToiletPaper
,
VideoCamera
,
Suitcase
,
Collection
,
Files
,
Monitor
,
Edit
,
User
,
Filter
,
Coordinate
,
Notebook
,
Picture
}
from
'@element-plus/icons-vue'
export
const
menus
:
IMenuItem
[]
=
[
{
tag
:
'v1-resource'
,
...
...
@@ -20,7 +34,7 @@ export const menus: IMenuItem[] = [
},
{
tag
:
'v1-resource-lesson-plan-list'
,
icon
:
Collection
,
icon
:
FolderOpened
,
name
:
'教案'
,
path
:
'/resource/lessonplan'
},
...
...
@@ -31,14 +45,14 @@ export const menus: IMenuItem[] = [
path
:
'/resource/other'
},
{
icon
:
Expand
,
icon
:
Collection
,
name
:
'题库管理'
,
path
:
'
/
'
path
:
'
https://qa-center.ezijing.com/question/list
'
},
{
icon
:
Document
,
icon
:
ToiletPaper
,
name
:
'试卷管理'
,
path
:
'
/
'
path
:
'
https://qa-center.ezijing.com/paper/list
'
}
]
},
...
...
src/components/layout/Aside.vue
浏览文件 @
1824e960
...
...
@@ -7,6 +7,7 @@ export default {
<
script
setup
lang=
"ts"
>
import
{
menus
}
from
'@/assets/menus'
import
type
{
IMenuItem
}
from
'@/types'
const
router
=
useRouter
()
const
route
=
useRoute
()
const
menuList
=
$computed
<
IMenuItem
[]
>
(()
=>
{
...
...
@@ -27,22 +28,40 @@ const defaultActive = computed(() => {
})
return
found
?
found
.
path
:
'/'
})
function
isUrl
(
path
:
string
)
{
return
/^https
?
:
\/\/
/
.
test
(
path
)
}
function
handleClick
(
path
:
string
)
{
if
(
isUrl
(
path
))
{
window
.
open
(
path
)
}
else
{
router
.
push
(
path
)
}
}
</
script
>
<
template
>
<aside
class=
"app-aside"
>
<nav
class=
"nav"
>
<el-menu
:default-active=
"defaultActive"
:router=
"true"
class=
"app-menu"
>
<el-menu
:default-active=
"defaultActive"
class=
"app-menu"
>
<template
v-for=
"item in menuList"
:key=
"item.path"
>
<el-sub-menu
:index=
"item.path"
v-permission=
"item.tag"
v-if=
"item.children"
>
<template
#
title
>
<el-icon><component
:is=
"item.icon"
></component></el-icon>
{{
item
.
name
}}
</
template
>
<el-menu-item
:index=
"subitem.path"
v-for=
"subitem in item.children"
:key=
"subitem.path"
v-permission=
"subitem.tag"
>
<el-menu-item
:index=
"subitem.path"
v-for=
"subitem in item.children"
:key=
"subitem.path"
v-permission=
"subitem.tag"
@
click=
"handleClick(subitem.path)"
>
{{ subitem.name }}
</el-menu-item>
</el-sub-menu>
<el-menu-item
:index=
"item.path"
v-permission=
"item.tag"
v-else
>
<el-menu-item
:index=
"item.path"
v-permission=
"item.tag"
@
click=
"handleClick(item.path)"
v-else
>
<el-icon><component
:is=
"item.icon"
></component></el-icon>
{{ item.name }}
</el-menu-item>
</template>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论