优化: 代码质量收尾(搜索索引补全+编译警告清理+i18n核验+String替newtype)

This commit is contained in:
lxy
2026-07-01 12:11:35 +08:00
parent 0338210ba2
commit 6771d396f0
15 changed files with 242 additions and 36 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import { taskApi } from '@/api'
import type { TaskQuery } from '@/api/types'
import type { TaskQuery, ProjectId } from '@/api/types'
import { t } from '@/i18n/i18n-helpers'
import { runWithCatch } from '@/composables/useStoreAction'
import { state } from './state'
@@ -22,7 +22,7 @@ export function createTasksStore() {
})
}
async function createTask(input: { project_id: string; title: string; description?: string; priority?: number; branch_name?: string; assignee?: string; idea_id?: string }) {
async function createTask(input: { project_id: ProjectId; title: string; description?: string; priority?: number; branch_name?: string; assignee?: string; idea_id?: string }) {
const record = await runWithCatch(state, t('tasks.err.createFailed'), async () => {
const r = await taskApi.create(input)
state.tasks.push(r)