更新文件:TWD 改為整數四捨五入的說明與 Kotlin 陷阱紀錄

This commit is contained in:
Timmy
2026-04-17 13:21:01 +08:00
parent 296e254d9d
commit d95379d7bb
5 changed files with 62 additions and 6 deletions

View File

@@ -96,13 +96,13 @@ BotRates.app/
輸入解析用 `parse_amount`,忽略逗號和空白再 parse。
TWD 顯示用 `format_twd`,手刻千分位 separator沒引入 `num-format` crate 以減少 binary size
TWD 顯示用 `format_twd`四捨五入到個位(`v.round() as i64`Rust 的 `f64::round` 本身就是 ties away from zero符合中文四捨五入手刻千分位 separator沒引入 `num-format` crate 以減少 binary size
## 階段 7複製功能
兩種複製方式並存:
1. **按鈕複製**(主要 UX按「複製」→ `ui.output_mut(|o| o.copied_text = raw)`,複製純數 `3162.00`(不含 `NT$`、不含逗號)。原因:這樣貼到 Excel 會被識別成數字而不是文字。
1. **按鈕複製**(主要 UX按「複製」→ `ui.output_mut(|o| o.copied_text = raw)`,複製純`3163`(不含 `NT$`、不含逗號、不含小數)。原因:這樣貼到 Excel 會被識別成數字而不是文字。
2. **選取複製**`egui::Label::new(...).selectable(true)`,使用者可以用滑鼠拉選 TWD 文字後 `Cmd/Ctrl+C`
按下按鈕後短暫顯示「已複製」1.2 秒),用 `Option<(String, Instant)>` 追蹤狀態 + `ctx.request_repaint_after` 觸發回復重繪。