project init

This commit is contained in:
zxy
2024-02-02 10:23:22 +08:00
commit dc7051417b
681 changed files with 142886 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
import {setStore, getStore} from '@/util/store'
const cmanageTitle = {
state: {
isSearch: getStore({name: 'isSearch'}) || false,
searchInput: getStore({name: 'searchInput'}) || '',
},
actions: {
layoutIsSearch ({commit}, type) {
commit('SET_ISSEARCH', type)
},
layoutIsSearchInput ({commit}, str) {
commit('SET_SEARCHINPUT', str)
}
},
mutations: {
SET_ISSEARCH: (state, type) => {
state.isSearch = type;
setStore({name: 'isSearch', content: state.isSearch, type: 'local'})
},
SET_SEARCHINPUT: (state, str) => {
state.searchInput = str;
setStore({name: 'searchInput', content: state.searchInput, type: 'local'})
},
}
}
export default cmanageTitle