feat: add log function

This commit is contained in:
Gabe Yuan
2024-03-19 18:07:18 +08:00
parent 1d9e9c1b7d
commit 6e927473b9
24 changed files with 76 additions and 41 deletions

View File

@@ -8,6 +8,7 @@ import { genEventName, removeEndchar, matchInputStr, sleep } from "./utils";
import { stepShortcutRegister } from "./shortcut";
import { apiTranslate } from "../apis";
import { loadingSvg } from "./svg";
import { kissLog } from "./log";
function isInputNode(node) {
return node.nodeName === "INPUT" || node.nodeName === "TEXTAREA";
@@ -187,7 +188,7 @@ export default function inputTranslate({
collapseToEnd(node);
}
} catch (err) {
console.log("[translate input]", err.message);
kissLog(err, "translate input");
} finally {
removeLoading(node, loadingId);
}