Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
project-www-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
project-www-pc
Commits
8253d394
提交
8253d394
authored
12月 14, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updates
上级
95a26b98
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
14 行增加
和
40 行删除
+14
-40
Head.vue
components/Head.vue
+14
-40
没有找到文件。
components/Head.vue
浏览文件 @
8253d394
...
@@ -30,11 +30,7 @@
...
@@ -30,11 +30,7 @@
</client-only>
</client-only>
</
template
>
</
template
>
<div
class=
"language"
>
<div
class=
"language"
>
<span
<span
@
click=
"switchLocale('zh-CN')"
:class=
"isEn === false ? 'cn' : ''"
>
中文
</span>
/
<span
@
click=
"switchLocale('zh-CN')"
:class=
"isEn === false ? 'cn' : ''"
>
中文
</span
>
/
<span
:class=
"isEn === true ? 'cn' : ''"
:class=
"isEn === true ? 'cn' : ''"
@
click=
"switchLocale('en-US')"
@
click=
"switchLocale('en-US')"
>
EN
</span
>
EN
</span
...
@@ -49,37 +45,21 @@
...
@@ -49,37 +45,21 @@
<div
:class=
"getNameActive(item)"
>
<div
:class=
"getNameActive(item)"
>
<template
v-if=
"!item.path"
>
<template
v-if=
"!item.path"
>
<template
v-if=
"item.click"
>
<template
v-if=
"item.click"
>
<span
<span
@
click=
"showEnroll"
v-html=
"item.name"
:class=
"isEn === true ? 'name1' : ''"
></span>
@
click=
"showEnroll"
v-html=
"item.name"
:class=
"isEn === true ? 'name1' : ''"
></span>
</
template
>
<
template
v-else
v-html=
"item.name"
:class=
"isEn === true ? 'name1' : ''"
>
</
template
>
</
template
>
<
template
v-else
v-html=
"item.name"
:class=
"isEn === true ? 'name1' : ''"
>
</
template
>
</template>
</template>
<
template
v-else
>
<
template
v-else
>
<nuxt-link
:to=
"item.path"
>
<nuxt-link
:to=
"item.path"
>
<div
<div
v-html=
"item.name"
:class=
"isEn === true ? 'name1' : ''"
></div
v-html=
"item.name"
:class=
"isEn === true ? 'name1' : ''"
></div
></nuxt-link>
></nuxt-link>
</
template
>
</
template
>
</div>
</div>
<div
class=
"child-item"
v-if=
"item.childern
&&
"
>
<div
class=
"child-item"
v-if=
"item.childern"
>
<div
class=
"one-level"
>
<div
class=
"one-level"
>
<
template
v-for=
"(level2Item, level2Index) in item.childern"
>
<
template
v-for=
"(level2Item, level2Index) in item.childern"
>
<div
<div
:class=
"
:class=
"$route.path === level2Item.path || level2Item.isShow ? 'li active' : 'li'"
$route.path === level2Item.path || level2Item.isShow
? 'li active'
: 'li'
"
:key=
"level2Index + 'level2'"
:key=
"level2Index + 'level2'"
@
mouseenter=
"levelShow(level2Item)"
@
mouseenter=
"levelShow(level2Item)"
@
mouseleave=
"levelShow(level2Item, 'out')"
@
mouseleave=
"levelShow(level2Item, 'out')"
...
@@ -90,10 +70,7 @@
...
@@ -90,10 +70,7 @@
:class=
"isEn === true ? 'name1' : ''"
:class=
"isEn === true ? 'name1' : ''"
v-html=
"level2Item.name"
v-html=
"level2Item.name"
></div>
></div>
<div
<div
class=
"el-icon-arrow-right"
v-if=
"level2Item.childern"
></div>
class=
"el-icon-arrow-right"
v-if=
"level2Item.childern"
></div>
</div>
</div>
</
template
>
</
template
>
</div>
</div>
...
@@ -173,6 +150,7 @@ export default {
...
@@ -173,6 +150,7 @@ export default {
name
:
this
.
$t
(
'menu.baseChild.laboratory'
),
name
:
this
.
$t
(
'menu.baseChild.laboratory'
),
path
:
'/practice/laboratory'
,
path
:
'/practice/laboratory'
,
isShow
:
false
,
isShow
:
false
,
childern
:
[
childern
:
[
{
{
name
:
'商业数据分析实验室'
,
name
:
'商业数据分析实验室'
,
...
@@ -429,9 +407,9 @@ export default {
...
@@ -429,9 +407,9 @@ export default {
}
}
},
},
navLeave
()
{
navLeave
()
{
this
.
navData
.
map
(
(
item
)
=>
{
this
.
navData
.
map
(
item
=>
{
if
(
item
.
childern
)
{
if
(
item
.
childern
)
{
item
.
childern
.
map
(
(
cItem
)
=>
{
item
.
childern
.
map
(
cItem
=>
{
cItem
.
isShow
=
false
cItem
.
isShow
=
false
})
})
}
}
...
@@ -449,14 +427,14 @@ export default {
...
@@ -449,14 +427,14 @@ export default {
},
},
computed
:
{
computed
:
{
getNameActive
()
{
getNameActive
()
{
return
(
item
)
=>
{
return
item
=>
{
const
currentPath
=
this
.
$route
.
path
const
currentPath
=
this
.
$route
.
path
if
(
currentPath
.
includes
(
item
.
path
))
{
if
(
currentPath
.
includes
(
item
.
path
))
{
return
'name active'
return
'name active'
}
else
{
}
else
{
let
className
=
'name'
let
className
=
'name'
if
(
item
.
childern
)
{
if
(
item
.
childern
)
{
item
.
childern
.
map
(
(
cData
)
=>
{
item
.
childern
.
map
(
cData
=>
{
cData
.
path
===
currentPath
&&
(
className
=
'name active'
)
cData
.
path
===
currentPath
&&
(
className
=
'name active'
)
})
})
}
}
...
@@ -469,18 +447,14 @@ export default {
...
@@ -469,18 +447,14 @@ export default {
},
},
loginURL
()
{
loginURL
()
{
return
process
.
client
return
process
.
client
?
`
${
?
`
${
process
.
env
.
loginURL
}
/login/index?redirect_uri=
${
encodeURIComponent
(
process
.
env
.
loginURL
}
/login/index?redirect_uri=
${
encodeURIComponent
(
location
.
origin
+
this
.
$route
.
fullPath
location
.
origin
+
this
.
$route
.
fullPath
)}
`
)}
`
:
''
:
''
},
},
registerURL
()
{
registerURL
()
{
return
process
.
client
return
process
.
client
?
`
${
process
.
env
.
loginURL
}
/register?redirect_uri=
${
encodeURIComponent
(
?
`
${
process
.
env
.
loginURL
}
/register?redirect_uri=
${
encodeURIComponent
(
location
.
origin
+
this
.
$route
.
fullPath
)}
`
location
.
origin
+
this
.
$route
.
fullPath
)}
`
:
''
:
''
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论