feat(dacli): 迁移 BS-31 label 非空检查
This commit is contained in:
1 parent
480d41b766
commit
f01eb5f4aa
1 file changed
+14
@@ -73,4 +73,18 @@ export function checkBs23(columnDataRaw: unknown): BlindspotIssue[] {
|
||||
}
|
||||
}
|
||||
return issues
|
||||
}
|
||||
|
||||
export function checkBs31(formDataRaw: unknown): BlindspotIssue[] {
|
||||
const issues: BlindspotIssue[] = []
|
||||
const fields = extractFields(safeParse(formDataRaw))
|
||||
if (!fields) return issues
|
||||
fields.forEach((f, i) => {
|
||||
const ff = f as { __config__?: { label?: string }; __vModel__?: string }
|
||||
const label = ff.__config__?.label
|
||||
if (!label || !label.trim()) {
|
||||
issues.push({ id: 'BS-31', level: 'ERROR', path: `formData.fields[${i}] (${ff.__vModel__ || '?'})`, message: 'label 为空 → 浏览器层空白' })
|
||||
}
|
||||
})
|
||||
return issues
|
||||
}
|
||||
Reference in new issue
Block a user