Przeglądaj źródła

chore: 将 .claude/settings.local.json 移除跟踪并加入 gitignore

- 该文件为个人本地配置,多人协作会被反复修改造成冲突
- 加入 .gitignore 后每个开发者可维护自己的 settings.local.json
- memory/feedback_loading_pattern.md 记录开发规范:提交按钮需 loading + 0.5s 延时关闭

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
xiaohaizhao 2 dni temu
rodzic
commit
7b3bc9a481
3 zmienionych plików z 20 dodań i 10 usunięć
  1. 0 9
      .claude/settings.local.json
  2. 2 1
      .gitignore
  3. 18 0
      memory/feedback_loading_pattern.md

+ 0 - 9
.claude/settings.local.json

@@ -1,9 +0,0 @@
-{
-  "permissions": {
-    "allow": [
-      "Bash(npm install *)",
-      "Bash(timeout 30 npm run serve)",
-      "mcp__ide__getDiagnostics"
-    ]
-  }
-}

+ 2 - 1
.gitignore

@@ -1,3 +1,4 @@
 node_modules
 node_modules
 yos
 yos
-package-lock.json
+package-lock.json
+.claude/settings.local.json

+ 18 - 0
memory/feedback_loading_pattern.md

@@ -0,0 +1,18 @@
+---
+name: edit-submit-loading
+description: 编辑/新建等确定操作必须加 loading,成功后延时 0.5s 关闭
+metadata:
+  type: feedback
+---
+
+所有编辑、新建、删除等确定操作按钮必须添加 `:loading` 状态。
+
+**Why:** 用户要求 -- 防止重复提交,给用户操作反馈。
+
+**How to apply:**
+1. 在 data 中加 `loading: false`
+2. 确认按钮绑定 `:loading="loading"`
+3. `onSubmit` 中调用 API 前 `this.loading = true`
+4. 成功后 `setTimeout(() => { this.loading = false; ... }, 500)` 延时关闭
+
+涉及状态变更的操作(如启用/停用开关)需要先弹 `this.$confirm` 确认框。