Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
admin-yweb
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yfront
admin-yweb
Commits
11b567e0
Commit
11b567e0
authored
Aug 28, 2018
by
YoMon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
844b0d17
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
17 deletions
+16
-17
layouts/default.vue
+2
-2
store/getters.js
+2
-2
store/index.js
+3
-5
store/modules/financal-tags.js
+1
-1
store/modules/goods-tags.js
+6
-5
store/modules/order-manage-tags.js
+1
-1
store/modules/system-tags.js
+1
-1
No files found.
layouts/default.vue
View file @
11b567e0
...
...
@@ -163,13 +163,13 @@ export default {
this
.
$router
.
push
({
path
:
'/'
})
console
.
log
(
this
.
$store
.
state
.
tagsView
.
visitedViews
)
//
console.log(this.$store.state.tagsView.visitedViews)
},
entriesClick
(
item
)
{
this
.
$router
.
push
({
path
:
item
.
pagePath
})
console
.
log
(
this
.
$store
.
state
.
tagsView
.
visitedViews
)
//
console.log(this.$store.state.tagsView.visitedViews)
},
// 获取窗口可视范围的高度
getClientHeight
()
{
...
...
store/getters.js
View file @
11b567e0
...
...
@@ -3,8 +3,8 @@ const getters = {
sCachedViews
:
state
=>
state
.
systemTags
.
sCachedViews
,
gVisitedViews
:
state
=>
state
.
goodsTags
.
gVisitedViews
,
gCachedViews
:
state
=>
state
.
goodsTags
.
gCachedViews
,
oVisitedViews
:
state
=>
state
.
goods
Tags
.
oVisitedViews
,
oCachedViews
:
state
=>
state
.
goods
Tags
.
oCachedViews
,
oVisitedViews
:
state
=>
state
.
order
Tags
.
oVisitedViews
,
oCachedViews
:
state
=>
state
.
order
Tags
.
oCachedViews
,
fVisitedViews
:
state
=>
state
.
financalTags
.
fVisitedViews
,
fCachedViews
:
state
=>
state
.
financalTags
.
fCachedViews
}
...
...
store/index.js
View file @
11b567e0
...
...
@@ -3,8 +3,8 @@ import Vuex from 'vuex'
import
systemTags
from
'./modules/system-tags'
import
usrAuth
from
'./modules/usr-auth'
import
goodsTags
from
'./modules/goods-tags'
import
orderTags
from
'./modules/order-manage-tags'
import
financalTags
from
'./modules/financal-tags'
//
import orderTags from './modules/order-manage-tags'
//
import financalTags from './modules/financal-tags'
import
getters
from
'./getters'
Vue
.
use
(
Vuex
)
...
...
@@ -15,9 +15,7 @@ const store = () => {
modules
:
{
usrAuth
,
systemTags
,
goodsTags
,
orderTags
,
financalTags
goodsTags
},
getters
})
...
...
store/modules/financal-tags.js
View file @
11b567e0
...
...
@@ -6,7 +6,7 @@ const financalTags = {
mutations
:
{
F_ADD_VISITED_VIEWS
:
(
state
,
view
)
=>
{
if
(
state
.
fVisitedViews
.
some
(
v
=>
v
.
path
===
view
.
path
))
return
if
(
view
.
path
===
'/'
)
return
//
if (view.path === '/') return
state
.
fVisitedViews
.
push
(
Object
.
assign
({},
view
,
{
title
:
view
.
meta
.
title
||
'no-name'
...
...
store/modules/goods-tags.js
View file @
11b567e0
...
...
@@ -6,7 +6,7 @@ const goodsTags = {
mutations
:
{
G_ADD_VISITED_VIEWS
:
(
state
,
view
)
=>
{
if
(
state
.
gVisitedViews
.
some
(
v
=>
v
.
path
===
view
.
path
))
return
if
(
view
.
path
===
'/'
)
return
//
if (view.path === '/') return
state
.
gVisitedViews
.
push
(
Object
.
assign
({},
view
,
{
title
:
view
.
meta
.
title
||
'no-name'
...
...
@@ -52,22 +52,22 @@ const goodsTags = {
}
},
actions
:
{
g
a
ddVisitedViews
({
commit
},
view
)
{
g
A
ddVisitedViews
({
commit
},
view
)
{
commit
(
'G_ADD_VISITED_VIEWS'
,
view
)
},
g
d
elVisitedViews
({
commit
,
state
},
view
)
{
g
D
elVisitedViews
({
commit
,
state
},
view
)
{
return
new
Promise
(
resolve
=>
{
commit
(
'G_DEL_VISITED_VIEWS'
,
view
)
resolve
([...
state
.
gVisitedViews
])
})
},
g
d
elOthersViews
({
commit
,
state
},
view
)
{
g
D
elOthersViews
({
commit
,
state
},
view
)
{
return
new
Promise
(
resolve
=>
{
commit
(
'G_DEL_OTHERS_VIEWS'
,
view
)
resolve
([...
state
.
gVisitedViews
])
})
},
g
d
elAllViews
({
commit
,
state
})
{
g
D
elAllViews
({
commit
,
state
})
{
return
new
Promise
(
resolve
=>
{
commit
(
'G_DEL_ALL_VIEWS'
)
resolve
([...
state
.
gVisitedViews
])
...
...
@@ -75,4 +75,5 @@ const goodsTags = {
}
}
}
export
default
goodsTags
store/modules/order-manage-tags.js
View file @
11b567e0
...
...
@@ -6,7 +6,7 @@ const orderTags = {
mutations
:
{
O_ADD_VISITED_VIEWS
:
(
state
,
view
)
=>
{
if
(
state
.
oVisitedViews
.
some
(
v
=>
v
.
path
===
view
.
path
))
return
if
(
view
.
path
===
'/'
)
return
//
if (view.path === '/') return
state
.
oVisitedViews
.
push
(
Object
.
assign
({},
view
,
{
title
:
view
.
meta
.
title
||
'no-name'
...
...
store/modules/system-tags.js
View file @
11b567e0
...
...
@@ -6,7 +6,7 @@ const systemTags = {
mutations
:
{
S_ADD_VISITED_VIEWS
:
(
state
,
view
)
=>
{
if
(
state
.
sVisitedViews
.
some
(
v
=>
v
.
path
===
view
.
path
))
return
if
(
view
.
path
===
'/'
)
return
//
if (view.path === '/') return
state
.
sVisitedViews
.
push
(
Object
.
assign
({},
view
,
{
title
:
view
.
meta
.
title
||
'no-name'
...
...
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