删除权限

This commit is contained in:
砂糖
2025-07-19 17:29:15 +08:00
parent 245bc4973b
commit 5bd163d8cd
19 changed files with 253 additions and 221 deletions

View File

@@ -0,0 +1,30 @@
import { listCategory } from '@/api/wms/category';
const state = {
categoryList: []
};
const mutations = {
SET_CATEGORY_LIST(state, list) {
state.categoryList = list;
}
};
const actions = {
getCategoryList({ state, commit }) {
if (state.categoryList.length > 0) {
return Promise.resolve(state.categoryList);
}
return listCategory().then(res => {
commit('SET_CATEGORY_LIST', res.rows || []);
return res.rows || [];
});
}
};
export default {
namespaced: true,
state,
mutations,
actions
};