export const state = () => ({
results: []
})
export const mutations = {
initialFilters(state, res) {
// write something .....
}
}
initialFilters()函数在突变方法中无法识别
export const getters = {
filter(state, mutations) {
let results = mutations.initialFilters(state.results);
return results;
}
}
答案 0 :(得分:0)
字母和计算函数不应具有调用突变之类的副作用。