优化: 清理无意义注释(走查编号前缀/过时历史标注/死代码注释)

This commit is contained in:
lxy
2026-08-15 18:05:43 +08:00
parent 5a4c821629
commit 5ac815b9ca
137 changed files with 735 additions and 737 deletions
+5 -5
View File
@@ -9,11 +9,11 @@ export function createIdeasStore() {
/**
* 加载灵感列表。
*
* F-260621-02:status/keyword/order_by 下沉后端 WHERE,取代前端 computed filter。
* status/keyword/order_by 下沉后端 WHERE,取代前端 computed filter。
* - 传 `query` → 多条件查询(状态/关键词/排序/分页)。
* - 不传 → 全量(created_at DESC,等价旧行为)。
*
* WK-7:成功时清 state.error(load 后不残留旧错误),失败由 runWithCatch 置 error。
* 成功时清 state.error(load 后不残留旧错误),失败由 runWithCatch 置 error。
*/
async function loadIdeas(query?: IdeaQuery) {
state.error = null
@@ -40,7 +40,7 @@ export function createIdeasStore() {
}
async function deleteIdea(id: string): Promise<boolean> {
// WK-7:返成功布尔(失败时 runWithCatch 已置 state.error),调用方据此保留选中态
// 返成功布尔(失败时 runWithCatch 已置 state.error),调用方据此保留选中态
const ok = await runWithCatch(state, t('ideas.err.deleteFailed'), async () => {
await ideaApi.delete(id)
state.ideas = state.ideas.filter(i => i.id !== id)
@@ -57,7 +57,7 @@ export function createIdeasStore() {
}
async function promoteIdea(id: string) {
// WK-4:不再内部全量 loadIdeas(会把 store.ideas 冲成全集、冲掉当前筛选视图)。
// 不再内部全量 loadIdeas(会把 store.ideas 冲成全集、冲掉当前筛选视图)。
// 由视图(Ideas.vue promoteToProject)操作后按当前 buildIdeaQuery() 主动重载。
return await ideaApi.promote(id)
}
@@ -65,7 +65,7 @@ export function createIdeasStore() {
async function relateIdeas(subjectId: string, targetIds: string[]) {
await runWithCatch(state, t('ideas.err.relateFailed'), async () => {
await ideaApi.relateIdeas(subjectId, targetIds)
// WK-4:后端原子更新受影响灵感,原全量 loadIdeas 会冲掉当前筛选视图;
// 后端原子更新受影响灵感,原全量 loadIdeas 会冲掉当前筛选视图;
// 改由视图(Ideas.vue onUpdateRelated)按当前 query 重载。
})
}