From 9d12af671ab98c52a4b627ecb8721aa4f95883ab Mon Sep 17 00:00:00 2001 From: guoapeng Date: Thu, 12 Jun 2025 01:42:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=B7=A5=E8=89=BA=E5=8A=A0=E6=B6=B2?= =?UTF-8?q?=E6=AD=A5=E9=AA=A46=20=E6=8F=90=E7=A4=BA=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E5=A4=B1=E8=AF=AF;=20=E5=8A=A8=E6=80=81=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/craft/AddCraft/index.vue | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/components/craft/AddCraft/index.vue b/src/components/craft/AddCraft/index.vue index a78ab59..47e9971 100644 --- a/src/components/craft/AddCraft/index.vue +++ b/src/components/craft/AddCraft/index.vue @@ -32,12 +32,12 @@ onMounted(async () => { form.value = { ...props.sourceData, stepList: JSON.parse(props.sourceData.steps || '[]') } form.value.stepList?.forEach((step: CraftTypes.StepItem) => { if (step.params.second) { - step.params.minutes = Math.floor(step.params.second / 60) - step.params.seconds = step.params.second % 60 + step.params.minutes = Math.floor(step.params.second / 60) || undefined + step.params.seconds = step.params.second % 60 || undefined } if (step.params.coolingSecond) { - step.params.coolingMinutes = Math.floor(step.params.coolingSecond / 60) - step.params.coolingSeconds = step.params.coolingSecond % 60 + step.params.coolingMinutes = Math.floor(step.params.coolingSecond / 60) || undefined + step.params.coolingSeconds = step.params.coolingSecond % 60 || undefined } }) } @@ -106,11 +106,11 @@ const okHandle = async () => { step.params.description = `拍照` break } - return !allPropertiesDefined(step.params, ['minutes', 'seconds', 'description', 'inTemperature']) + return !allPropertiesDefined(step.params, ['minutes', 'seconds', 'coolingMinutes', 'coolingSeconds', 'description', 'inTemperature']) }, ) - + console.log(form.value) if (invalidStepIndex !== -1) { FtMessage.error(`步骤${(invalidStepIndex || 0) + 1}: 请填写完整参数`) return @@ -374,6 +374,9 @@ const addHandle = async () => { mL + + + @@ -588,6 +591,11 @@ const addHandle = async () => { } .step-solution-item { display: flex; + align-items: center; margin-bottom: 5px; + .el-icon { + font-size: 18px; + line-height: 100%; + } }