RaoMeng 7 éve
szülő
commit
204956f1ca

+ 9 - 0
frontend/wechat-web/src/redux/actions/listState.js

@@ -6,6 +6,11 @@
 import {CLEAR_LIST_STATE, LIST_STATE} from "../constants/actionTypes";
 import store from '../store/store'
 
+/**
+ * 保存列表状态
+ * @param data
+ * @returns {Function}
+ */
 export const saveListState = (data) => {
     return () => {
         store.dispatch({
@@ -15,6 +20,10 @@ export const saveListState = (data) => {
     }
 }
 
+/**
+ * 清除列表状态
+ * @returns {Function}
+ */
 export const clearListState = () => {
     return () => {
         store.dispatch({

+ 2 - 0
frontend/wechat-web/src/redux/reducers/redListState.js

@@ -20,11 +20,13 @@ const redListState = (state = initListState, action) => {
 
     switch (action.type) {
         case LIST_STATE:
+            //更新列表状态
             return {
                 ...state,
                 ...action
             }
         case CLEAR_LIST_STATE:
+            //清空列表状态
             return initListState
         default:
             return state