fix: 分类回显

fix-0609-xwk
向文可 2 years ago
parent 7d7fa4a629
commit cd11407ebd

@ -92,10 +92,19 @@ const actions = {
return res;
},
load: async ({ state, commit }) => {
const deep = (arr) =>
arr.map((item) => {
return {
...item,
id: item.id + '',
childList: deep(item.childList || []),
};
});
commit('setOpts', {
...state.opts,
init: true,
category: await categoryAPI.search(),
category: deep(await categoryAPI.search()),
});
},
detail: async (context, id) => {

Loading…
Cancel
Save