Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1
Commits
9bca8256
Commit
9bca8256
authored
Dec 12, 2021
by
林家欣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改由于mock数据导致导航显示问题
parent
81afcb1c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
43 additions
and
23 deletions
+43
-23
HeaderDropdown.vue
src/components/layout/header/HeaderDropdown.vue
+2
-0
index.vue
src/components/layout/header/index.vue
+14
-13
mock.js
src/components/layout/header/mock.js
+0
-0
index.js
src/router/index.js
+1
-1
links.js
src/utils/links.js
+4
-0
Fap.vue
src/views/Business/Fap.vue
+14
-6
Training.vue
src/views/Business/Training.vue
+6
-1
pages.vue
src/views/comps/pages.vue
+2
-2
No files found.
src/components/layout/header/HeaderDropdown.vue
View file @
9bca8256
...
...
@@ -95,6 +95,8 @@ export default {
return
(
<
div
class
=
{
classNames
.
join
(
" "
).
trim
()}
style
=
{
items
[
0
].
style
}
>
{
items
.
map
((
item
)
=>
{
console
.
log
(
item
.
isHiddenMenu
,
'item.isHiddenMenu'
);
if
(
item
.
isHiddenMenu
)
return
return
(
<
div
class
=
"gs-dropdown-item"
>
<
span
...
...
src/components/layout/header/index.vue
View file @
9bca8256
...
...
@@ -23,7 +23,7 @@
class=
"gs-nav-item nav-item"
:key=
"nav.id"
:class=
"
{ active: currentNav === nav.id }"
@click="handleNavClick(nav,$event)"
@click="handleNavClick(nav,
$event)"
>
<a
:id=
"`gs-nav-item-$
{nav.id}`"
...
...
@@ -44,7 +44,7 @@
<li
v-else
:key=
"nav.id"
@
click=
"handleNavClick(nav,$event)"
@
click=
"handleNavClick(nav,
$event)"
class=
"gs-nav-item nav-item"
:class=
"
{ active: currentNav === nav.id }"
>
...
...
@@ -71,14 +71,12 @@
<
script
>
import
HeaderBtn
from
"./HeaderBtn.vue"
;
import
HeaderDropdown
from
"./HeaderDropdown.vue"
;
import
{
nav
}
from
"./mock"
;
import
Qs
from
"qs"
import
{
cleanObject
,
}
from
"@/axios/parameter"
import
{
nav
}
from
"./mock"
;
import
Qs
from
"qs"
;
import
{
cleanObject
}
from
"@/axios/parameter"
;
export
default
{
components
:
{
HeaderBtn
,
HeaderDropdown
},
components
:
{
HeaderBtn
,
HeaderDropdown
},
data
()
{
return
{
// 点击事件来自头部导航
...
...
@@ -161,7 +159,7 @@ export default {
if
(
!
nav
.
children
||
nav
.
children
.
length
===
0
)
{
this
.
currentNav
=
nav
.
id
;
this
.
preActive
=
""
;
this
.
$router
.
push
({
path
:
nav
.
link
});
this
.
$router
.
push
({
path
:
nav
.
link
});
}
else
{
// 点击事件不来自子代导航item
if
(
!
this
.
fromDropdown
)
{
...
...
@@ -169,8 +167,8 @@ export default {
// 重复点击同一个nav
if
(
this
.
currentNav
===
nav
.
id
)
{
this
.
currentNav
=
this
.
preActive
;
this
.
preActive
=
""
}
else
{
this
.
preActive
=
""
;
}
else
{
// 点击的是有dropdown的nav 需要保存当前激活状态
if
(
this
.
preActive
===
""
)
{
this
.
preActive
=
this
.
currentNav
;
...
...
@@ -192,7 +190,10 @@ export default {
item
.
breadcrumb
&&
this
.
$store
.
commit
(
"system/SET_BREADCRUMB"
,
item
.
breadcrumb
);
// this.$store.commit("system/SET_SUB_NAV", item.root.children);
this
.
$router
.
push
({
path
:
item
.
link
});
this
.
$router
.
push
({
path
:
item
.
link
,
query
:
item
.
query
||
{},
});
}
},
...
...
@@ -200,7 +201,7 @@ export default {
// console.log('updateCurrent', id);
this
.
currentNav
=
id
;
this
.
preActive
=
""
;
}
}
,
},
};
</
script
>
...
...
src/components/layout/header/mock.js
View file @
9bca8256
This diff is collapsed.
Click to expand it.
src/router/index.js
View file @
9bca8256
import
Vue
from
"vue"
;
import
VueRouter
from
"vue-router"
;
import
main
from
"@/components/main.vue"
;
import
{
service
}
from
"@/router/service"
;
import
{
service
}
from
"@/router/service"
;
Vue
.
use
(
VueRouter
);
...
...
src/utils/links.js
0 → 100644
View file @
9bca8256
export
const
link
=
{
pxspkc
:
'http://v3.gds.org.cn/LoginService.aspx'
,
}
\ No newline at end of file
src/views/Business/Fap.vue
View file @
9bca8256
...
...
@@ -10,7 +10,7 @@
:key=
"i"
>
<button
:class=
"['nav-link',
{ active:
$route.query.id
=== tmp.type }]"
:class=
"['nav-link',
{ active:
current
=== tmp.type }]"
:id="tmp.type + '-tab'"
data-bs-toggle="tab"
:data-bs-target="'#' + tmp.type"
...
...
@@ -33,11 +33,7 @@
<div
v-for=
"(tmp, i) in list"
:key=
"i"
:class=
"[
'tab-pane',
'fade',
{ 'show active': $route.query.id === tmp.type },
]"
:class=
"['tab-pane', 'fade',
{ 'show active': current === tmp.type }]"
:id="tmp.type"
role="tabpanel"
:aria-labelledby="tmp.type + '-tab'"
...
...
@@ -169,6 +165,18 @@ export default {
],
};
},
computed
:
{
current
()
{
// console.log(this.$route.query.id, "$route.query.id");
let
id
;
if
(
this
.
$route
.
query
.
id
)
{
id
=
this
.
$route
.
query
.
id
;
}
else
{
id
=
"qbwt"
;
}
return
id
;
},
},
methods
:
{
jump
(
i
)
{
// console.log(i);
...
...
src/views/Business/Training.vue
View file @
9bca8256
...
...
@@ -63,7 +63,7 @@
系统成员可登录中国商品信息服务平台的成员专区选择在线学习服务培训视频教程,即可简单、有效、快速的学习到实用的商品条码知识,了解GS1系统并按标准使用商品条码,如需了解请按下方提示点击进入。
</p>
<p
class=
"pxspkc-btn"
>
<button>
点击进入
</button>
<button
@
click=
"pxspkcHandelClick"
>
点击进入
</button>
</p>
<p>
<img
...
...
@@ -98,6 +98,7 @@ import cate from "../comps/cate.vue";
import
fzzx
from
"./copms/fzzx.vue"
;
import
{
nav
}
from
"@/components/layout/header/mock"
;
import
{
deepFindBreadcrumb
}
from
"@/utils/utils"
;
import
{
link
}
from
"@/utils/links"
;
export
default
{
components
:
{
...
...
@@ -289,6 +290,10 @@ export default {
this
.
currentList
=
this
.
tabs
[
i
].
list
;
this
.
updateKey
=
new
Date
().
getTime
();
},
// 培训视频课程点击进入
pxspkcHandelClick
()
{
window
.
open
(
link
.
pxspkc
,
'_blank'
);
},
jump
()
{
// this.$router.push({
// path: "/Org/Branch",
...
...
src/views/comps/pages.vue
View file @
9bca8256
...
...
@@ -60,10 +60,10 @@ export default {
};
},
mounted
(){
console
.
log
(
this
.
currPage
)
//
console.log(this.currPage)
},
methods
:{
changeSize
(
i
){
changeSize
(){
this
.
$emit
(
'getLimit'
,
this
.
currPage
)
},
goPage
(
i
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment