Skip to content

Commit 9dd752f

Browse files
committed
fix(Temperature Converter): don't round to 2 digits
Fix CorentinTh#1486
1 parent 1e17818 commit 9dd752f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

components.d.ts

+3
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ declare module '@vue/runtime-core' {
254254
NH1: typeof import('naive-ui')['NH1']
255255
NH3: typeof import('naive-ui')['NH3']
256256
NIcon: typeof import('naive-ui')['NIcon']
257+
NInputGroup: typeof import('naive-ui')['NInputGroup']
258+
NInputGroupLabel: typeof import('naive-ui')['NInputGroupLabel']
259+
NInputNumber: typeof import('naive-ui')['NInputNumber']
257260
NLayout: typeof import('naive-ui')['NLayout']
258261
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
259262
NMenu: typeof import('naive-ui')['NMenu']

src/tools/temperature-converter/temperature-converter.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function update(key: TemperatureScale) {
9494
_.chain(units)
9595
.omit(key)
9696
.forEach(({ fromKelvin }, index) => {
97-
units[index].ref = Math.floor((fromKelvin(kelvins) ?? 0) * 100) / 100;
97+
units[index].ref = fromKelvin(kelvins) ?? 0;
9898
})
9999
.value();
100100
}

0 commit comments

Comments
 (0)