Repository navigation
fix: 分组倍率 Ratio 输入框保留小数中间态,修复无法输入 0.05 - #5995
Conversation
The ratio column normalized input to number on every keystroke, so typing 0.05 got stuck at 0.0 which Number() collapses to 0. Keep the value as a string draft like the top-up ratio column and only convert to number when serializing. Fixes QuantumNous#5986
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe ChangesRatio Input Handling
Estimated code review effort: 1 (Trivial) | ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…uantumNous#5995) The ratio column normalized input to number on every keystroke, so typing 0.05 got stuck at 0.0 which Number() collapses to 0. Keep the value as a string draft like the top-up ratio column and only convert to number when serializing. Fixes QuantumNous#5986
…uantumNous#5995) The ratio column normalized input to number on every keystroke, so typing 0.05 got stuck at 0.0 which Number() collapses to 0. Keep the value as a string draft like the top-up ratio column and only convert to number when serializing. Fixes QuantumNous#5986
…uantumNous#5995) The ratio column normalized input to number on every keystroke, so typing 0.05 got stuck at 0.0 which Number() collapses to 0. Keep the value as a string draft like the top-up ratio column and only convert to number when serializing. Fixes QuantumNous#5986
…uantumNous#5995) The ratio column normalized input to number on every keystroke, so typing 0.05 got stuck at 0.0 which Number() collapses to 0. Keep the value as a string draft like the top-up ratio column and only convert to number when serializing. Fixes QuantumNous#5986
…uantumNous#5995) The ratio column normalized input to number on every keystroke, so typing 0.05 got stuck at 0.0 which Number() collapses to 0. Keep the value as a string draft like the top-up ratio column and only convert to number when serializing. Fixes QuantumNous#5986 (cherry picked from commit 394b023)
…uantumNous#5995) The ratio column normalized input to number on every keystroke, so typing 0.05 got stuck at 0.0 which Number() collapses to 0. Keep the value as a string draft like the top-up ratio column and only convert to number when serializing. Fixes QuantumNous#5986
…uantumNous#5995) The ratio column normalized input to number on every keystroke, so typing 0.05 got stuck at 0.0 which Number() collapses to 0. Keep the value as a string draft like the top-up ratio column and only convert to number when serializing. Fixes QuantumNous#5986
…uantumNous#5995) The ratio column normalized input to number on every keystroke, so typing 0.05 got stuck at 0.0 which Number() collapses to 0. Keep the value as a string draft like the top-up ratio column and only convert to number when serializing. Fixes QuantumNous#5986
…uantumNous#5995) The ratio column normalized input to number on every keystroke, so typing 0.05 got stuck at 0.0 which Number() collapses to 0. Keep the value as a string draft like the top-up ratio column and only convert to number when serializing. Fixes QuantumNous#5986
📝 变更描述 / Description
分组定价表格的 Ratio 列每敲一个键就把输入值
Number()化再回填,输入 0.05 走到0.0时被折叠成0,小数没法继续输。改法对齐同文件充值倍率(Top-up ratio)列的既有做法:
GroupPricingRow.ratio改成字符串草稿,输入过程不做转换,只在serializeGroupPricingRows()序列化时经normalizeRatio转 number。输入期间父组件 props 回流时groupPricingSignature比较的是序列化后的数值,0.0与0签名一致,rows 不会被重建,草稿得以保留——这也是充值倍率列一直没这个问题的原因。空值等边界的落库行为与改动前一致。🚀 变更类型 / Type of change
🔗 关联任务 / Related Issue
✅ 提交前检查项 / Checklist
Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。📸 运行证明 / Proof of Work
Summary by CodeRabbit
1, matching the displayed input format.