refactor: 清理代码注释并优化组件结构

- 在 useQrCode.ts 中移除多余的注释,简化代码逻辑。
- 在 DataPreview.tsx 和 FieldEditor.tsx 中删除不必要的注释,提升可读性。
- 在 format.ts 和 jsonToToml.ts 中更新注释内容,确保准确性。
This commit is contained in:
雨霖铃
2026-06-19 01:04:15 +08:00
parent cd21d11fa1
commit c69a26b469
7 changed files with 18 additions and 64 deletions
+1 -1
View File
@@ -204,7 +204,7 @@ export function jsonToToml(text: string): JsonToTomlResult {
// TOML 要求顶层是表
if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) {
throw new Error('TOML requires the top-level value to be an object');
throw new Error('TOML 要求顶层值必须是一个对象');
}
const lines: string[] = [];