fix.🛠️: 更改bill校验规则 & 更改table size

This commit is contained in:
clz 2022-09-06 18:53:52 +08:00
parent e4f0428c7e
commit ee9eb0e7a6

View File

@ -100,7 +100,7 @@ function Record() {
bill.money = Number(money)
bill.options = options
const checkBill = () => {
return bill.cls !== '' && bill.label !== '' && bill.money !== 0
return bill.cls !== '' && bill.label !== '' && bill.money > 0
}
const reset = () => {
setCls("")
@ -195,7 +195,7 @@ function Record() {
placeholder="money"
prefix="¥"
value={money}
onChange={setMoney}
onChange={value => Number(value) < 0 ? setMoney('') : setMoney(value)}
onKeyDown={e => e.key === "Enter" && submit()}
/>
<Input.TextArea
@ -221,6 +221,7 @@ function Record() {
<Table
dataSource={datasource}
columns={columns}
size="small"
/>
<Button
icon={<CloudUploadOutlined />}