Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sensorConsult
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
zhanglw
sensorConsult
Commits
4c750b82
Commit
4c750b82
authored
Jun 20, 2023
by
zhanglw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
面包屑
parent
812c1049
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
25 deletions
+54
-25
app.js
src/store/modules/app.js
+8
-1
breadcrumb.vue
src/views/homepage/components/breadcrumb.vue
+35
-0
titleMenus.vue
src/views/homepage/components/titleMenus.vue
+3
-1
titleMenusV2.vue
src/views/homepage/components/titleMenusV2.vue
+3
-1
index.vue
src/views/homepage/product/index.vue
+5
-22
No files found.
src/store/modules/app.js
View file @
4c750b82
...
...
@@ -6,7 +6,8 @@ const state = {
withoutAnimation
:
false
},
device
:
'
desktop
'
,
size
:
Cookies
.
get
(
'
size
'
)
||
'
mini
'
size
:
Cookies
.
get
(
'
size
'
)
||
'
mini
'
,
currentMenu
:
{}
}
const
mutations
=
{
...
...
@@ -30,6 +31,9 @@ const mutations = {
SET_SIZE
:
(
state
,
size
)
=>
{
state
.
size
=
size
Cookies
.
set
(
'
size
'
,
size
)
},
SET_CURRENT_MENU
:
(
state
,
currentMenu
)
=>
{
state
.
currentMenu
=
currentMenu
}
}
...
...
@@ -45,6 +49,9 @@ const actions = {
},
setSize
({
commit
},
size
)
{
commit
(
'
SET_SIZE
'
,
size
)
},
setCurrentMenu
({
commit
},
currentMenu
)
{
commit
(
'
SET_CURRENT_MENU
'
,
currentMenu
)
}
}
...
...
src/views/homepage/components/breadcrumb.vue
0 → 100644
View file @
4c750b82
<
template
>
<div
class=
"showcase"
>
<el-breadcrumb
separator-class=
"el-icon-arrow-right"
>
<el-breadcrumb-item
:to=
"
{ path: '/home' }">首页
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
this
.
$store
.
state
.
app
.
currentMenu
.
name
||
''
}}
</el-breadcrumb-item>
</el-breadcrumb>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
visible
:
false
}
},
mounted
()
{
this
.
$nextTick
(()
=>
{
})
},
methods
:
{
click
()
{
this
.
visible
=
!
this
.
visible
}
}
}
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
.showcase
{
padding
:
1px
15px
1px
;
font-size
:
20px
;
font-family
:
Source
Han
Sans
CN
;
font-weight
:
400
;
}
</
style
>
src/views/homepage/components/titleMenus.vue
View file @
4c750b82
...
...
@@ -8,7 +8,7 @@ export default {
data
()
{
return
{
menus
:
[
{
name
:
'
首页
'
,
active
:
true
},
{
name
:
'
优质产品
'
},
{
name
:
'
优质供应商
'
},
{
name
:
'
解决方案与服务
'
},
{
name
:
'
软件系统
'
},
{
name
:
'
专业培训
'
},
{
name
:
'
行业资讯
'
},
{
name
:
'
信息发布
'
}
{
name
:
'
首页
'
,
url
:
'
/home
'
},
{
name
:
'
优质产品
'
,
url
:
'
/product
'
},
{
name
:
'
优质供应商
'
},
{
name
:
'
解决方案与服务
'
},
{
name
:
'
软件系统
'
},
{
name
:
'
专业培训
'
},
{
name
:
'
行业资讯
'
},
{
name
:
'
信息发布
'
}
],
currentMenuObj
:
null
}
...
...
@@ -16,11 +16,13 @@ export default {
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
currentMenuObj
=
this
.
menus
[
0
]
this
.
$store
.
dispatch
(
'
app/setCurrentMenu
'
,
this
.
currentMenuObj
)
})
},
methods
:
{
menuClick
(
item
)
{
this
.
currentMenuObj
=
item
this
.
$router
.
push
({
path
:
item
.
url
||
'
/home
'
})
}
}
}
...
...
src/views/homepage/components/titleMenusV2.vue
View file @
4c750b82
...
...
@@ -17,7 +17,7 @@ export default {
data
()
{
return
{
menus
:
[
{
name
:
'
首页
'
,
active
:
true
},
{
name
:
'
优质产品
'
},
{
name
:
'
优质供应商
'
},
{
name
:
'
解决方案与服务
'
},
{
name
:
'
软件系统
'
},
{
name
:
'
专业培训
'
},
{
name
:
'
行业资讯
'
},
{
name
:
'
信息发布
'
}
{
name
:
'
首页
'
,
url
:
'
/home
'
},
{
name
:
'
优质产品
'
,
url
:
'
/product
'
},
{
name
:
'
优质供应商
'
},
{
name
:
'
解决方案与服务
'
},
{
name
:
'
软件系统
'
},
{
name
:
'
专业培训
'
},
{
name
:
'
行业资讯
'
},
{
name
:
'
信息发布
'
}
],
currentMenuObj
:
null
}
...
...
@@ -25,11 +25,13 @@ export default {
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
currentMenuObj
=
this
.
menus
[
this
.
menuIndex
]
this
.
$store
.
dispatch
(
'
app/setCurrentMenu
'
,
this
.
currentMenuObj
)
})
},
methods
:
{
menuClick
(
item
)
{
this
.
currentMenuObj
=
item
this
.
$router
.
push
({
path
:
item
.
url
||
'
/home
'
})
}
}
}
...
...
src/views/homepage/product/index.vue
View file @
4c750b82
...
...
@@ -10,12 +10,7 @@
</div>
</div>
<div
class=
"content-box"
>
<div
class=
"showcase"
>
<el-breadcrumb
separator-class=
"el-icon-arrow-right"
>
<el-breadcrumb-item
:to=
"
{ path: '/home' }">首页
</el-breadcrumb-item>
<el-breadcrumb-item>
xxx
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<breadcrumb
/>
</div>
<div
style=
"width:100vw;height: 100vh"
/>
<home-footer
ref=
"homeFooter"
/>
...
...
@@ -25,10 +20,11 @@
import
titleMenus
from
'
../components/titleMenusV2
'
import
userLogin
from
'
../components/userLoginV2
'
import
languageSetting
from
'
../components/languageSettingV2
'
import
breadcrumb
from
'
../components/breadcrumb
'
import
homeFooter
from
'
../components/homeFooter
'
export
default
{
components
:
{
titleMenus
,
userLogin
,
languageSetting
,
homeFooter
},
components
:
{
titleMenus
,
userLogin
,
languageSetting
,
breadcrumb
,
homeFooter
},
dicts
:
[
'
product_type
'
,
'
area_province
'
],
data
()
{
return
{
...
...
@@ -45,20 +41,7 @@ export default {
})
},
methods
:
{
onDictReady
(
dict
)
{
this
.
currentProductTypeObj
=
dict
.
product_type
[
0
]
},
// 变更产品推送
changeProductPush
(
item
)
{
clearTimeout
(
this
.
throttle
)
this
.
throttle
=
setTimeout
(()
=>
{
if
(
this
.
currentProductTypeObj
===
item
)
{
return
}
console
.
log
(
item
)
this
.
currentProductTypeObj
=
item
},
this
.
throttleTime
)
},
onDictReady
(
dict
)
{},
// 点击询价
inquiry
(
item
,
type
)
{
console
.
log
(
item
,
type
)
...
...
@@ -110,7 +93,7 @@ export default {
.content-box
{
display
:
flex
;
justify-content
:
center
;
margin-top
:
9
0
px
;
margin-top
:
9
4
px
;
user-select
:
none
;
.showcase
{
width
:
90%
;
...
...
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