From d77e7505bee37b3000f9be940a6a2d5a46e2760a Mon Sep 17 00:00:00 2001 From: huangdeliang Date: Sun, 3 Jan 2021 10:29:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=8F=9C=E5=93=81=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stdiet-ui/src/views/custom/dishes/index.vue | 22 ++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/stdiet-ui/src/views/custom/dishes/index.vue b/stdiet-ui/src/views/custom/dishes/index.vue index 1ff0a14d0..474a43547 100644 --- a/stdiet-ui/src/views/custom/dishes/index.vue +++ b/stdiet-ui/src/views/custom/dishes/index.vue @@ -173,7 +173,15 @@ prop="weight" label="重量(g)"> { - if (idx) { + if (idx > 1) { arr[idx] = data.reduce((acc, dAcc) => { - if (idx === 1) { + if (idx === 2) { return acc + parseFloat(dAcc.weight); } return acc + dAcc[cur.property] * dAcc.weight / 100; @@ -520,4 +528,12 @@ padding: 0 4px; border: unset; } + + .weight { + width: 70px + } + + .weight .el-input .el-input__inner { + padding: 0 32px 0 4px; + }