Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 医院需求项目数字为1时,应显示为不限数量 #49

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions source/page/Hospital/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,23 @@ export class HospitalPage extends mixin<{}, HospitalPageState>() {
title={hospital}
>
<ol>
{supplies.map(({ name, count, remark }) => (
<li title={remark}>
{name}{' '}
<span className="badge badge-danger">
{count}个
</span>
</li>
))}
{supplies.map(({ name, count, remark }) => {
let n = +count;
let showCount = '';
if (n === 1) {
showCount = '数量不限';
} else {
showCount = count + '个';
}
return (
<li title={remark}>
{name}{' '}
<span className="badge badge-danger">
{showCount}
</span>
</li>
);
})}
</ol>

<div className="text-center">
Expand Down