Explorar o código

题卡bug修改

zhangjie %!s(int64=3) %!d(string=hai) anos
pai
achega
4efcb0995f
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      card/store/card.js

+ 3 - 2
card/store/card.js

@@ -36,8 +36,9 @@ const mutations = {
     state.curDragElement = curDragElement;
   },
   setCurPage(state, curPageNo) {
-    state.curPage = state.pages[curPageNo];
-    state.curPageNo = curPageNo;
+    const pageNo = state.pages[curPageNo] ? curPageNo : 0;
+    state.curPage = state.pages[pageNo];
+    state.pageNo = pageNo;
   },
   setCurPageNo(state, curPageNo) {
     state.curPageNo = curPageNo;