Commit 11b567e0 by YoMon

修改

parent 844b0d17
......@@ -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() {
......
......@@ -3,8 +3,8 @@ const getters = {
sCachedViews: state => state.systemTags.sCachedViews,
gVisitedViews: state => state.goodsTags.gVisitedViews,
gCachedViews: state => state.goodsTags.gCachedViews,
oVisitedViews: state => state.goodsTags.oVisitedViews,
oCachedViews: state => state.goodsTags.oCachedViews,
oVisitedViews: state => state.orderTags.oVisitedViews,
oCachedViews: state => state.orderTags.oCachedViews,
fVisitedViews: state => state.financalTags.fVisitedViews,
fCachedViews: state => state.financalTags.fCachedViews
}
......
......@@ -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
})
......
......@@ -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'
......
......@@ -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: {
gaddVisitedViews({ commit }, view) {
gAddVisitedViews({ commit }, view) {
commit('G_ADD_VISITED_VIEWS', view)
},
gdelVisitedViews({ commit, state }, view) {
gDelVisitedViews({ commit, state }, view) {
return new Promise(resolve => {
commit('G_DEL_VISITED_VIEWS', view)
resolve([...state.gVisitedViews])
})
},
gdelOthersViews({ commit, state }, view) {
gDelOthersViews({ commit, state }, view) {
return new Promise(resolve => {
commit('G_DEL_OTHERS_VIEWS', view)
resolve([...state.gVisitedViews])
})
},
gdelAllViews({ commit, state }) {
gDelAllViews({ commit, state }) {
return new Promise(resolve => {
commit('G_DEL_ALL_VIEWS')
resolve([...state.gVisitedViews])
......@@ -75,4 +75,5 @@ const goodsTags = {
}
}
}
export default goodsTags
......@@ -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'
......
......@@ -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'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment