Skip to content

Commit 4d29330

Browse files
committed
fix(InputNumber): Number was not updated correctly when using min value, fix rounding issue #53
1 parent 4667a8a commit 4d29330

File tree

4 files changed

+601
-637
lines changed

4 files changed

+601
-637
lines changed

dev/pages/inputs/InputNumber.vue

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,30 @@ const schema
2929
style: { background: 'gray' },
3030
readonly: true,
3131
},
32+
// Case with Min Value
33+
{
34+
$formkit: 'primeInputNumber',
35+
name: 'numberInputWithMinNumber',
36+
label: 'Number Input with Min Value',
37+
min: 10,
38+
},
39+
// Extensive case
40+
{
41+
$formkit: 'primeInputNumber',
42+
name: 'customizedInputNumber',
43+
label: 'Customized Input Number',
44+
placeholder: 'Enter currency',
45+
useGrouping: true,
46+
minFractionDigits: 2,
47+
maxFractionDigits: 4, // Maximum four decimal places
48+
mode: 'currency', // Switch mode to currency
49+
currency: 'USD', // Currency in dollars
50+
locale: 'en-US', // Locale set to US
51+
showButtons: true, // Show increment/decrement buttons
52+
buttonLayout: 'horizontal', // Layout for the buttons
53+
step: 0.01, // Increment by 0.01
54+
},
55+
3256
]
3357
3458
const data = { }

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,24 +100,24 @@
100100
"@antfu/eslint-config": "3.6.2",
101101
"@formkit/core": "^1.6.7",
102102
"@primevue/themes": "4.0.7",
103-
"@types/node": "^22.5.5",
103+
"@types/node": "^22.6.1",
104104
"@unocss/preset-icons": "0.62.4",
105105
"@unocss/preset-uno": "0.62.4",
106106
"@vitejs/plugin-vue": "^5.1.4",
107107
"@vitest/coverage-v8": "^2.1.1",
108108
"@vitest/ui": "^2.1.1",
109109
"@vue/compiler-sfc": "3.5.6",
110-
"@vue/server-renderer": "^3.5.6",
110+
"@vue/server-renderer": "^3.5.8",
111111
"@vue/test-utils": "^2.4.6",
112112
"@vue/tsconfig": "^0.5.1",
113113
"@vuedx/typecheck": "~0.7.6",
114114
"@vuedx/typescript-plugin-vue": "~0.7.6",
115115
"@vueuse/core": "^11.1.0",
116116
"@vueuse/head": "^2.0.0",
117-
"changelogen": "^0.5.5",
117+
"changelogen": "^0.5.7",
118118
"chart.js": "^4.4.4",
119119
"consola": "^3.2.3",
120-
"eslint": "^9.10.0",
120+
"eslint": "^9.11.1",
121121
"happy-dom": "^15.7.4",
122122
"json-editor-vue": "^0.16.0",
123123
"mkdist": "^1.5.9",
@@ -130,7 +130,7 @@
130130
"unplugin-auto-import": "^0.18.3",
131131
"unplugin-vue-components": "^0.27.4",
132132
"vanilla-jsoneditor": "^0.23.8",
133-
"vite": "^5.4.6",
133+
"vite": "^5.4.7",
134134
"vite-plugin-dts": "4.2.1",
135135
"vite-plugin-eslint": "^1.8.1",
136136
"vite-plugin-pages": "^0.32.3",

0 commit comments

Comments
 (0)