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