Skip to content

Commit

Permalink
chore: to optimize the mainPath console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
cuixiaorui committed Mar 10, 2021
1 parent 23ab7b2 commit fb18871
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions lib/mini-vue.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/mini-vue.cjs.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions lib/mini-vue.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/mini-vue.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/mini-core/Debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class Debug {
mainPath(text) {
return window.console.log.bind(
window.console,
`%c${this.languageTranslator.transition(text)}`,
`%c[ mainPath ] ${this.languageTranslator.transition(text)}`,
"color:red"
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/runtime-core/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { Text } from "./vnode";
import { shouldUpdateComponent } from "./componentRenderUtils";

export const render = (vnode, container) => {
console.log("调用 patch");
debug.mainPath("调用 patch")();
patch(null, vnode, container);
};

Expand Down

0 comments on commit fb18871

Please sign in to comment.