fix(short-drama-agent-front): 修复代码格式检查问题

This commit is contained in:
GJ committed 2026-10-21 17:04:02 +08:00
1 parent 81d6a85260
commit 48fce3975f
87 files changed
+5714 -1436

No files matched your search

@@ -38,7 +38,8 @@ watch(
value => {
if (baseline.value && dirty.value) return
savedConstraints.value = JSON.parse(JSON.stringify(value?.hardConstraints ?? []))
legacyConstraints.value = !Array.isArray(savedConstraints.value) || !savedConstraints.value.every(item => typeof item === 'string')
legacyConstraints.value =
!Array.isArray(savedConstraints.value) || !savedConstraints.value.every(item => typeof item === 'string')
savedConstraintsText = legacyConstraints.value ? '' : (savedConstraints.value as string[]).join('\n')
Object.assign(form, {
name: value?.name ?? '默认视觉风格',
@@ -64,9 +65,13 @@ function save() {
characterPrompt: form.characterPrompt,
scenePrompt: form.scenePrompt,
propPrompt: form.propPrompt,
hardConstraints: legacyConstraints.value || form.constraints === savedConstraintsText
? savedConstraints.value
: form.constraints.split('\n').map(item => item.trim()).filter(Boolean),
hardConstraints:
legacyConstraints.value || form.constraints === savedConstraintsText
? savedConstraints.value
: form.constraints
.split('\n')
.map(item => item.trim())
.filter(Boolean),
isLocked: form.isLocked
})
}
@@ -148,7 +153,14 @@ function save() {
</section>
<!-- 以下是要求填写说明;旧格式只读核对,不在普通编辑时丢失内容 -->
<p class="text-xs leading-6 text-muted">每行填写一条画面要求,留空表示没有补充要求。</p>
<NCollapse v-if="legacyConstraints"><NCollapseItem name="legacy-rules" title="查看已有要求(高级)"><p class="text-xs leading-6 text-muted">已有要求使用旧格式,保存风格时会原样保留。</p><pre class="whitespace-pre-wrap break-words text-xs">{{ JSON.stringify(savedConstraints, null, 2) }}</pre></NCollapseItem></NCollapse>
<NCollapse v-if="legacyConstraints"
><NCollapseItem name="legacy-rules" title="查看已有要求(高级)"
><p class="text-xs leading-6 text-muted">已有要求使用旧格式,保存风格时会原样保留。</p>
<pre class="whitespace-pre-wrap break-words text-xs">{{
JSON.stringify(savedConstraints, null, 2)
}}</pre>
</NCollapseItem></NCollapse
>
<NCheckbox
:disabled="disabled"
id="style-lock"