Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
source-trace-manage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenqikuai
source-trace-manage
Commits
a029f3f1
Commit
a029f3f1
authored
Mar 29, 2022
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
387bbb32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
Main.vue
src/views/Main.vue
+24
-2
No files found.
src/views/Main.vue
View file @
a029f3f1
...
...
@@ -17,22 +17,38 @@
</
template
>
<
script
lang=
"ts"
setup
>
import
{
router
}
from
"@/router"
;
import
{
globalState
}
from
"@/store/state"
;
import
{
sySideBar
,
syBusinessHeader
}
from
"cqk-sy-ui"
import
{
reactive
}
from
"vue"
;
import
{
reactive
,
watch
}
from
"vue"
;
import
{
useRoute
}
from
"vue-router"
;
const
route
=
useRoute
()
const
sideBarState
=
reactive
({
menuList
:
[
{
name
:
"存证"
,
icon
:
""
,
path
:
'/categoryManage'
,
navigate
:
()
=>
{
router
.
push
(
'/categoryManage'
)
},
},
{
name
:
"溯源"
,
icon
:
""
,
path
:
''
,
navigate
:
()
=>
{
window
.
open
(
globalState
.
urlList
.
chain_browser_url
)
}
},
{
name
:
"管理"
,
icon
:
""
,
path
:
'/userCenter'
,
navigate
:
()
=>
{
router
.
push
(
'/userCenter'
)
},
},
],
current
:
0
,
...
...
@@ -43,10 +59,16 @@ const sideBarState = reactive({
selectedMenuBgColor
:
'#39393e'
,
selectedIconColor
:
"rgba(255, 255, 255, 0.6)"
,
selectCurrent
:
(
v
:
number
)
=>
{
sideBarState
.
current
=
v
;
sideBarState
.
menuList
[
v
].
navigate
()
if
(
sideBarState
.
menuList
[
v
].
name
!==
'溯源'
)
{
sideBarState
.
current
=
v
;
}
},
})
const
menuIndex
=
sideBarState
.
menuList
.
findIndex
(
i
=>
i
.
path
===
route
.
path
)
sideBarState
.
current
=
menuIndex
const
handleLogout
=
()
=>
{
sessionStorage
.
removeItem
(
"user"
);
router
.
push
(
"/"
);
...
...
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