refactor: 清理代码注释并优化组件结构
- 在 useQrCode.ts 中移除多余的注释,简化代码逻辑。 - 在 DataPreview.tsx 和 FieldEditor.tsx 中删除不必要的注释,提升可读性。 - 在 format.ts 和 jsonToToml.ts 中更新注释内容,确保准确性。
This commit is contained in:
@@ -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[] = [];
|
||||
|
||||
Reference in New Issue
Block a user