add test.

This commit is contained in:
2017-07-03 23:12:19 +02:00
parent 6235c50908
commit 508a041db0
119 changed files with 4733 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
export default {
modules: {
navigator: {
strict: true,
namespaced: true,
state: {
stack: [],
options: {}
},
mutations: {
push (state, page) {
state.stack.push(page)
},
pop (state) {
if (state.stack.length > 1) {
state.stack.pop()
}
},
replace (state, page) {
state.stack.pop()
state.stack.push(page)
},
reset (state, page) {
state.stack = [page || state.stack[0]]
},
options (state, newOptions = {}) {
state.options = newOptions
}
}
},
splitter: {
strict: true,
namespaced: true,
state: {
open: false
},
mutations: {
toggle (state, shouldOpen) {
if (shouldOpen instanceof Boolean) {
state.open = shouldOpen
} else {
state.open = !state.open
}
}
}
},
tabbar: {
strict: true,
namespaced: true,
state: {
index: 0
},
mutations: {
set (state, index) {
state.index = index
}
}
}
}
}