diff --git a/src/views/account/AccountView.vue b/src/views/account/AccountView.vue index 901ed30..e65625c 100644 --- a/src/views/account/AccountView.vue +++ b/src/views/account/AccountView.vue @@ -103,7 +103,8 @@ async function fetchRate() { fxLoading.value = true try { const res = await accountApi.fxRate(form.currency, 'KRW') - if (res?.rate != null) form.rate = Number(res.rate) + // 환율은 소수점 4자리로 통일(입력폼 step·저장 정밀도 일치) + if (res?.rate != null) form.rate = Math.round(Number(res.rate) * 10000) / 10000 else formInfo.value = '환율을 가져오지 못했어요. 직접 입력해 주세요.' } catch { formInfo.value = '환율 조회에 실패했어요. 직접 입력해 주세요.' @@ -1150,10 +1151,13 @@ onMounted(async () => {
- - +
+ 환율(1 {{ form.currency }}) +
+ + +
+
= ₩{{ (convertedKrw || 0).toLocaleString('ko-KR') }}
@@ -1937,34 +1941,43 @@ button.primary { } .fx-row { display: flex; - align-items: center; - gap: 0.5rem; + align-items: flex-end; + gap: 0.6rem; flex-wrap: wrap; margin: -0.3rem 0 0.2rem; } -.fx-rate { +.fx-rate-field { display: flex; flex-direction: column; - font-size: 0.8rem; } -.fx-rate input { +.fx-label { + font-size: 0.8rem; + margin-bottom: 0.2rem; +} +/* input 과 버튼을 한 행으로 — stretch 로 버튼 높이를 input 에 맞춤 */ +.fx-rate-input { + display: flex; + align-items: stretch; + gap: 0.4rem; +} +.fx-rate-input input { width: 7rem; } .fx-auto { - align-self: flex-end; - padding: 0.4rem 0.7rem; + padding: 0 0.7rem; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-background-soft); color: var(--color-text); font-size: 0.82rem; + white-space: nowrap; cursor: pointer; } .fx-krw { - align-self: flex-end; font-weight: 700; color: #b8860b; font-size: 0.9rem; + padding-bottom: 0.45rem; } .row-wallet { margin-right: 0.35rem;