Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-operation-4
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
达摩4.0重构
haoban-operation-4
Commits
fe425b2e
Commit
fe425b2e
authored
Aug 17, 2020
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 调整vue组件name属性,以及vue组件内部方法放置顺序
parent
bd1e6e0f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
18 deletions
+17
-18
aside-menu.vue
src/layout/aside-menu.vue
+10
-11
layout.vue
src/layout/layout.vue
+6
-6
yw-header.vue
src/layout/yw-header.vue
+1
-1
No files found.
src/layout/aside-menu.vue
View file @
fe425b2e
...
...
@@ -43,7 +43,7 @@
</template>
<
script
>
export
default
{
name
:
'
aside-m
enu'
,
name
:
'
AsideM
enu'
,
props
:
{
menu
:
Array
},
...
...
@@ -53,6 +53,15 @@ export default {
tabData
:
[]
};
},
methods
:
{
selectTab
(
item
)
{
if
(
Array
.
isArray
(
item
.
nodeChildren
)
&&
item
.
nodeChildren
.
length
>
0
)
{
item
.
collapsFlag
=
!
item
.
collapsFlag
;
}
else
{
this
.
$router
.
push
({
path
:
item
.
uri
});
}
},
},
watch
:
{
'$route.path'
:
{
immediate
:
true
,
...
...
@@ -78,16 +87,6 @@ export default {
}
}
}
},
methods
:
{
selectTab
(
item
)
{
if
(
Array
.
isArray
(
item
.
nodeChildren
)
&&
item
.
nodeChildren
.
length
>
0
)
{
item
.
collapsFlag
=
!
item
.
collapsFlag
;
}
else
{
this
.
$router
.
push
({
path
:
item
.
uri
});
}
},
}
};
</
script
>
...
...
src/layout/layout.vue
View file @
fe425b2e
...
...
@@ -18,7 +18,7 @@
import
YwHeader
from
'./yw-header.vue'
;
import
AsideMenu
from
'./aside-menu.vue'
;
export
default
{
name
:
'
l
ayout'
,
name
:
'
L
ayout'
,
components
:
{
YwHeader
,
AsideMenu
},
data
()
{
return
{
...
...
@@ -26,11 +26,6 @@ export default {
breadList
:
[]
}
},
watch
:
{
'$route.path'
()
{
this
.
breadList
=
[];
}
},
methods
:
{
updateAsideMenu
(
menu
)
{
this
.
menu
=
menu
||
[];
...
...
@@ -38,6 +33,11 @@ export default {
updateBread
(
val
)
{
this
.
breadList
=
val
||
[];
}
},
watch
:
{
'$route.path'
()
{
this
.
breadList
=
[];
}
}
}
</
script
>
...
...
src/layout/yw-header.vue
View file @
fe425b2e
...
...
@@ -41,7 +41,7 @@ import { origin, succCode } from '@/config'
import
fetch
from
'@/api'
;
const
{
getUserInfo
,
getLoginOut
,
isLogin
}
=
fetch
;
export
default
{
name
:
'
y
wHeader'
,
name
:
'
Y
wHeader'
,
data
()
{
return
{
origin
,
...
...
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