feat: 添加 inputMode 属性以支持小数输入

This commit is contained in:
hzm
2026-02-24 09:55:17 +08:00
parent b59f1c809f
commit faecf13df8
4 changed files with 7 additions and 0 deletions

View File

@@ -158,6 +158,7 @@ export default function HoldingEditModal({ fund, holding, onClose, onSave }) {
</label>
<input
type="number"
inputMode="decimal"
step="any"
className={`input ${!amount ? 'error' : ''}`}
value={amount}
@@ -175,6 +176,7 @@ export default function HoldingEditModal({ fund, holding, onClose, onSave }) {
</label>
<input
type="number"
inputMode="decimal"
step="any"
className="input"
value={profit}
@@ -192,6 +194,7 @@ export default function HoldingEditModal({ fund, holding, onClose, onSave }) {
</label>
<input
type="number"
inputMode="decimal"
step="any"
className={`input ${!share ? 'error' : ''}`}
value={share}
@@ -209,6 +212,7 @@ export default function HoldingEditModal({ fund, holding, onClose, onSave }) {
</label>
<input
type="number"
inputMode="decimal"
step="any"
className={`input ${!cost ? 'error' : ''}`}
value={cost}