Browse Source

Update zh-cn translation of Plugins.md (#739)

东方孤思子 Paris·QianSen 8 năm trước cách đây
mục cha
commit
de4e138b06
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      docs/zh-cn/plugins.md

+ 3 - 3
docs/zh-cn/plugins.md

@@ -103,9 +103,9 @@ const store = new Vuex.Store({
 const logger = createLogger({
   collapsed: false, // 自动展开记录的 mutation
   filter (mutation, stateBefore, stateAfter) {
-    // returns true if a mutation should be logged
-    // `mutation` is a { type, payload }
-    return mutation.type !== "aBlacklistedMutation"
+    // 若 mutation 需要被记录,就让它返回 true 即可
+    // 顺便,`mutation` 是个 { type, payload } 对象
+    return mutation.type !== "aBlacklistedMutation"
   },
   transformer (state) {
     // 在开始记录之前转换状态