Following is my function call:
await this.faqs({'fields.page': page, ...filters});
and function is:
async faqs({state, commit}, filters) {
const {items} = await fetchData({content_type: state.contentType, ...filters});
const faqs = items.map((item) => {
return {
id: item.systemId,
...item.fields,
};
});
commit('setFaqs', faqs);
return faqs;}
I want to pass two more parameters along with this rest operator. How can I do that?
async faqs({ state, commit }, filters) { ... }then there is no rest parameter;filtersseems to be an array maybe? so the calls looks likethis.faqs({ state: ..., commit: ... }, [ ... ])where[...]is an array of filters of you can pass. hard to tell without seeing more code.