Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Tinyu5
vue2-tools
提交
8ffac32b
V
vue2-tools
项目概览
Tinyu5
/
vue2-tools
与 Fork 源项目一致
Fork自
inscode / VueJS
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue2-tools
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
8ffac32b
编写于
3月 28, 2024
作者:
T
tinyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Thu Mar 28 09:56:00 CST 2024 inscode
上级
c7e4d4de
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
58 addition
and
16 deletion
+58
-16
src/App.vue
src/App.vue
+1
-1
src/components/layout/dynamicRoute.vue
src/components/layout/dynamicRoute.vue
+27
-0
src/components/layout/index.vue
src/components/layout/index.vue
+12
-10
src/router/routes.js
src/router/routes.js
+18
-5
src/utils/index.js
src/utils/index.js
+0
-0
src/utils/modules/routeUtils.js
src/utils/modules/routeUtils.js
+0
-0
未找到文件。
src/App.vue
浏览文件 @
8ffac32b
...
...
@@ -5,7 +5,7 @@
</
template
>
<
script
>
import
Layout
from
'
@/components/layout.vue
'
import
Layout
from
'
@/components/layout
/index
.vue
'
export
default
{
name
:
'
App
'
,
components
:
{
...
...
src/components/layout/dynamicRoute.vue
0 → 100644
浏览文件 @
8ffac32b
<
template
>
<div>
<router-view></router-view>
</div>
</
template
>
<
script
>
export
default
{
name
:
'
DynamicRoute
'
,
data
(){
return
{
}
},
mounted
(){
},
methods
:{
},
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/components/layout.vue
→
src/components/layout
/index
.vue
浏览文件 @
8ffac32b
...
...
@@ -3,37 +3,39 @@
<el-header>
<el-menu
:default-active=
"activeIndex2"
class=
"el-menu-demo"
mode=
"horizontal"
@
select=
"handleSelect"
background-color=
"#545c64"
text-color=
"#fff"
active-text-color=
"#ffd04b"
>
<el-menu-item
index=
"1"
><i
class=
"el-icon-s-home"
></i>
主页
</el-menu-item>
<template>
<el-menu-item
index=
"1"
><i
class=
"el-icon-s-pie"
></i>
主页
</el-menu-item>
</
template
>
<el-submenu
index=
"2"
>
<
template
slot=
"title"
>
我的工作台
</
template
>
<el-menu-item
index=
"2-1"
>
选项1
</el-menu-item>
<el-menu-item
index=
"2-2"
>
选项2
</el-menu-item>
<el-menu-item
index=
"2-3"
>
选项3
</el-menu-item>
<el-submenu
index=
"2-4"
>
<
template
slot=
"title"
>
选项4
</
template
>
<el-menu-item
index=
"2-4-1"
>
选项1
</el-menu-item>
<el-menu-item
index=
"2-4-2"
>
选项2
</el-menu-item>
<el-menu-item
index=
"2-4-3"
>
选项3
</el-menu-item>
</el-submenu>
</el-submenu>
<el-menu-item
index=
"3"
disabled
>
消息中心
</el-menu-item>
<el-menu-item
index=
"4"
><a
href=
"https://www.ele.me"
target=
"_blank"
>
订单管理
</a></el-menu-item>
</el-menu>
</el-header>
<el-main>
<
router-view></router-view
>
<
DynamicRoute/
>
</el-main>
</el-container>
</template>
<
script
>
import
DynamicRoute
from
'
./dynamicRoute.vue
'
;
import
routes
from
'
@/router/routes
'
function
converRouteData
(
arr
){
};
export
default
{
name
:
'
layout
'
,
components
:{
DynamicRoute
},
data
()
{
return
{
activeIndex
:
'
1
'
,
activeIndex2
:
'
1
'
menuList
:[]
}
},
methods
:
{
handleSelect
(
key
,
keyPath
)
{
console
.
log
(
key
,
keyPath
);
...
...
src/router/routes.js
浏览文件 @
8ffac32b
import
Home
from
'
@/views/Home/index.vue
'
import
DynamicRoute
from
'
@/components/layout/dynamicRoute.vue
'
export
default
[
{
path
:
'
/
'
,
meta
:{
title
:
'
主页
'
,
icon
:
'
el-icon-s-home
'
},
name
:
'
home
'
,
meta
:{},
component
:
Home
},
{
path
:
'
echarts
'
,
redirect
:
'
gantt
'
,
path
:
'
/element-ui
'
,
meta
:{
title
:
'
Element-Ui
'
,
icon
:
''
},
component
:
DynamicRoute
,
},
{
path
:
'
/antdv
'
,
meta
:{
title
:
'
Ant-Design-Vue
'
,
icon
:
''
},
component
:
DynamicRoute
,
},
{
path
:
'
/echarts
'
,
meta
:{
title
:
'
Echarts
'
,
icon
:
''
},
component
:
DynamicRoute
,
redirect
:
'
/echarts/gantt
'
,
children
:[
{
path
:
'
/echarts/
gantt
'
,
path
:
'
gantt
'
,
name
:
'
Gantt
'
,
meta
:{},
meta
:{
title
:
'
甘特图
'
},
component
:()
=>
import
(
'
@/views/Echarts/GanttChart.vue
'
)
}
]
...
...
src/utils/index.js
0 → 100644
浏览文件 @
8ffac32b
src/utils/modules/routeUtils.js
0 → 100644
浏览文件 @
8ffac32b
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录