add search filters to LibraryList and LibraryMap

This commit is contained in:
axolotle
2021-06-14 12:11:19 +02:00
parent 9c4018a615
commit a1f15457a0
5 changed files with 97 additions and 31 deletions
+9 -2
View File
@@ -20,7 +20,8 @@ export default {
nodeDepartId: undefined,
trees: {},
mode: undefined,
nodebook: undefined
nodebook: undefined,
search: ''
},
mutations: {
@@ -67,6 +68,10 @@ export default {
'SET_NODE_DEPART_ID' (state, id) {
state.nodeDepartId = id
},
'SET_SEARCH' (state, str) {
state.search = str
}
},
@@ -165,7 +170,9 @@ export default {
},
getters: {
mode: (state) => state.mode,
mode: state => state.mode,
nodeDepartId: state => state.nodeDepartId,
search: state => state.search,
nodebook: (state, getters, rootState) => {
if (!state.nodebook) return []