编辑发起变更获取字段为空判断修改

This commit is contained in:
2026-10-12 09:43:26 +08:00
parent 2756ed15e2
commit 7c5f0dea0b
3 changed files with 5 additions and 5 deletions
@@ -25,7 +25,7 @@ const generateLoading = ref<boolean>(false);
// 风险预分析loading
const analyzing = ref<boolean>(false);
// 是否显示险预分析
const preRiskShow = computed(() => form.value.severity !== '' || form.value.probability !== '' || form.value.protection !== '');
const preRiskShow = computed(() => form.value.severity || form.value.probability || form.value.protection);
// 是否显示变更识别结果
const identifyShow = computed(() => form.value.compare_rows.length > 0);
// 表单
@@ -134,7 +134,7 @@ watch(() => props.currentForm, (newVal:any) => {
<Icon icon="lucide:sparkles" class="size-16px text-violet-500" />
<span class="font-semibold text-base ml-2">变更内容描述</span>
</div>
<NButton ghost type="primary" @click="runIdentify" :disabled="btnDisabled || !form.description.trim()">
<NButton ghost type="primary" @click="runIdentify" :disabled="btnDisabled || !form.description?.trim()">
<Icon v-if="preLoading" icon="ri:loader-4-fill" class="size-16px animate-spin" />
<Icon v-else icon="fluent:wand-24-regular" class="size-16px" />
变更识别