You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
// counterSlice.ts 文件
import { createSlice } from "@reduxjs/toolkit"; const initialState = { systemInfo:[], orgInfo:{ id:'', name:'', value:'', code:'' }, accountInfo:{ id:'', name:'', value:'', code:'' } }; // 创建一个 Slice
export const systemStateSlice = createSlice({ name: "systemState", initialState, reducers: { updateSystemAllState: (state, { payload }) => { state.systemInfo = payload }, updateSystemOrgState: (state, { payload }) => { console.log('systemState.orgInfo------11----', payload) state.orgInfo = payload }, updateSystemAccountState: (state, { payload }) => { state.accountInfo = payload }, }, }); export const {updateSystemAllState, updateSystemOrgState, updateSystemAccountState } = systemStateSlice.actions; // 默认导出
export default systemStateSlice.reducer;
|