Compare commits

..

10 Commits

Author SHA1 Message Date
rsgltzyd b7191c09bb refactor(json-tools): 优化 JsonDiffPanel 交互体验并增强 TextInputArea 灵活性 2026-07-13 23:31:06 +08:00
rsgltzyd 60e74b5383 feat(json-tools): 实现响应式布局与窄屏手动比对模式 2026-07-13 23:23:49 +08:00
rsgltzyd e252b9065b style(ui): 优化 SwitchButtonGroup 交互样式并清理测试用例 2026-07-13 20:42:19 +08:00
rsgltzyd bc851414b4 refactor(utils): 将 diffNode 实现从递归改为迭代遍历 2026-07-10 23:22:46 +08:00
rsgltzyd e7639fef72 style: 增强 SwitchButtonGroup 的交互样式并移除冗余属性 2026-07-09 23:51:15 +08:00
rsgltzyd a8c0809363 refactor: 优化组件导出并移除未使用的组件并清理冗余代码 2026-07-09 23:38:14 +08:00
rsgltzyd fdbb51754d refactor: 为 SelectItem 组件添加 cursor-pointer 类以改善用户体验 2026-07-09 23:36:52 +08:00
rsgltzyd f0c3d9c173 refactor: 更新组件引用类型为 ComponentRef,以提高类型安全性 2026-07-09 23:28:59 +08:00
rsgltzyd 14d85e5265 refactor: 更新样式和组件结构以提升一致性和可读性
- 在 utils.ts 中引入 twMerge 以合并 Tailwind 类。
- 在 ConverterForm.tsx 中简化类名,移除冗余样式。
- 在 LiveClock.tsx 中调整样式,优化文本显示。
- 在 ResultView.tsx 中更新布局和样式,提升视觉效果。
2026-07-08 23:24:54 +08:00
rsgltzyd c8c3c88d99 refactor: 移除 PageSkeleton 组件及相关测试,更新 RouterContainer 以简化加载逻辑 2026-07-06 20:05:52 +08:00
4 changed files with 20 additions and 19 deletions
+2 -3
View File
@@ -669,7 +669,7 @@ src/pages/StorageCleaner/useStorageCleaner.ts — 页面级 Hook
### 9.1 功能元数据
功能名称与描述在 `config/featureMeta.ts``FEATURES` 数组中定义:
功能名称与描述在 `config/features.tsx``FEATURES` 数组中定义:
```typescript
{
@@ -677,11 +677,10 @@ src/pages/StorageCleaner/useStorageCleaner.ts — 页面级 Hook
label: '时间戳转换',
description: '日期与时间戳互转',
defaultVisible: true,
component: TimestampPage,
}
```
页面组件通过 `config/pageLoaders/` 按需加载,不在 `FEATURES` 中引用。
Dashboard 卡片、TopBar 搜索等功能从此处读取 `label` / `description`
### 9.2 页面与组件文案
+1 -1
View File
@@ -383,7 +383,7 @@ function loadRule(ruleId: string): void {
使用 `localStorage`,键名 `testDataGenerator_rules`。API 为**命名导出函数**(见 `src/utils/ruleStorage.ts`):
| 函数 | 说明 |
| ------------------------------------------------------ | ---------------------------------- |
| ---- | ---- |
| `getAll()` / `getById()` / `getByName()` | 读取 |
| `save()` / `update()` / `deleteRule()` / `duplicate()` | 写入;失败时返回 `null``false` |
| `recordUse()` | 递增 `useCount`、更新 `lastUsedAt` |
@@ -1505,7 +1505,9 @@ export class DataExporter {
```typescript
// src/types/testDataGenerator.ts
type WorkerRequestMessage = { type: 'start'; payload: WorkerStartPayload } | { type: 'cancel' };
type WorkerRequestMessage =
| { type: 'start'; payload: WorkerStartPayload }
| { type: 'cancel' };
type WorkerResponseMessage =
| { type: 'progress'; generationId: number; payload: GenerateProgress }
+1 -1
View File
@@ -43,7 +43,7 @@
写入经内部 `setAll()` 完成;`localStorage.setItem` 抛错(如配额超限)时返回 `false`,并 `console.error`**不会部分提交**
| 方法 | 写入失败返回值 | 常见失败原因 |
| -------------- | ---------------------------- | ------------------------------------------------------ |
| ---- | -------------- | ------------ |
| `save()` | `null` | 达上限、规则不存在(更新时)、`setItem` 异常 |
| `update()` | `null` | 规则不存在、`setItem` 异常 |
| `deleteRule()` | `false` | 规则不存在、`setItem` 异常 |