Files
kintone-customize-manager/MEMORY.md
2026-03-16 14:29:11 +08:00

43 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# MEMORY.md
## 2026-03-15 - CSS 模板字符串语法错误
### 遇到什么问题
- 在使用 `edit` 工具修改 `DomainForm.tsx` 中的 CSS 样式时,只替换了部分内容,导致 CSS 模板字符串语法错误
- 错误信息:`Unexpected token, expected ","``passwordHint` 定义处
- 原因:`.ant-form-item` 的 CSS 块没有正确关闭,缺少 `}` 和模板字符串结束符 `` ` ``
### 如何解决的
- 使用 `edit` 工具完整替换整个 `useStyles` 定义块,确保所有 CSS 模板字符串正确关闭
### 以后如何避免
- 修改 CSS-in-JS 样式时,尽量替换完整的样式块而非单行
- 修改后立即运行 `npx tsc --noEmit` 验证语法
- 注意模板字符串的开始 `` ` `` 和结束 `` ` `` 必须成对出现
---
## 2026-03-15 - UI 重构经验
### 变更内容
1. **DomainForm 表单间距**`marginMD``marginSM`
2. **AppDetail 头部布局**标题和按钮同一行flex 布局)
3. **AppDetail Tabs 重构**
- 移除 Tabs 组件
- 移除 "基本信息" tab
- 合并 4 个 JS/CSS tab 为单页面(选项 A单列滚动列表 + 分区标题)
- 新增 `viewMode` 状态管理列表/代码视图切换
- 点击文件进入代码视图,带返回按钮
### 文件修改
- `src/renderer/src/components/DomainManager/DomainForm.tsx`
- `src/renderer/src/components/AppDetail/AppDetail.tsx`
- `src/renderer/src/locales/zh-CN/app.json` - 添加 `backToList`
- `src/renderer/src/locales/en-US/app.json` - 添加 `backToList`
- `src/renderer/src/locales/ja-JP/app.json` - 添加 `backToList`