From 3f5468f64a4bc5bc1f42c3a06702b9ede80479b6 Mon Sep 17 00:00:00 2001 From: vitrum Date: Sat, 1 Feb 2020 10:34:41 +0800 Subject: [PATCH] =?UTF-8?q?[Bug]=20=E5=8C=BB=E9=99=A2=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=95=B0=E5=AD=97=E4=B8=BA1=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=BA=94=E6=98=BE=E7=A4=BA=E4=B8=BA=E4=B8=8D=E9=99=90?= =?UTF-8?q?=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/page/Hospital/index.tsx | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/source/page/Hospital/index.tsx b/source/page/Hospital/index.tsx index c3df05e..d8ba143 100644 --- a/source/page/Hospital/index.tsx +++ b/source/page/Hospital/index.tsx @@ -108,14 +108,23 @@ export class HospitalPage extends mixin<{}, HospitalPageState>() { title={hospital} >
    - {supplies.map(({ name, count, remark }) => ( -
  1. - {name}{' '} - - {count}个 - -
  2. - ))} + {supplies.map(({ name, count, remark }) => { + let n = +count; + let showCount = ''; + if (n === 1) { + showCount = '数量不限'; + } else { + showCount = count + '个'; + } + return ( +
  3. + {name}{' '} + + {showCount} + +
  4. + ); + })}