浏览代码

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

东方孤思子 Paris·QianSen 8 年之前
父节点
当前提交
de4e138b06
共有 1 个文件被更改,包括 3 次插入3 次删除
  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) {
     // 在开始记录之前转换状态