diff --git a/packages/devui-vue/devui/input-number/__tests__/input-number.spec.tsx b/packages/devui-vue/devui/input-number/__tests__/input-number.spec.tsx
index cc519dde5a..7afd9fe7d1 100644
--- a/packages/devui-vue/devui/input-number/__tests__/input-number.spec.tsx
+++ b/packages/devui-vue/devui/input-number/__tests__/input-number.spec.tsx
@@ -109,6 +109,28 @@ describe('d-input-number', () => {
wrapper.unmount();
});
+ it('decimal limit', async () => {
+ const num = ref(1);
+ const wrapper = mount({
+ setup() {
+ return () => ;
+ },
+ });
+
+ const inputInner = wrapper.find(ns.e('input-box'));
+ expect((inputInner.element as HTMLInputElement).value).toBe('1');
+
+ num.value = 1.23456;
+ await nextTick();
+ expect((inputInner.element as HTMLInputElement).value).toBe('1.23');
+
+ num.value = 1.99999;
+ await nextTick();
+ expect((inputInner.element as HTMLInputElement).value).toBe('1.99');
+
+ wrapper.unmount();
+ });
+
it('size', async () => {
const num = ref(1);
const wrapper = mount({
diff --git a/packages/devui-vue/devui/input-number/src/input-number-types.ts b/packages/devui-vue/devui/input-number/src/input-number-types.ts
index 6750a7de21..297a7187ee 100644
--- a/packages/devui-vue/devui/input-number/src/input-number-types.ts
+++ b/packages/devui-vue/devui/input-number/src/input-number-types.ts
@@ -39,6 +39,9 @@ export const inputNumberProps = {
type: Boolean,
default: true,
},
+ decimalLimit: {
+ type: Number,
+ },
allowEmpty: {
type: Boolean,
default: false,
diff --git a/packages/devui-vue/devui/input-number/src/input-number.tsx b/packages/devui-vue/devui/input-number/src/input-number.tsx
index 2165c4490e..e30b675047 100644
--- a/packages/devui-vue/devui/input-number/src/input-number.tsx
+++ b/packages/devui-vue/devui/input-number/src/input-number.tsx
@@ -27,6 +27,7 @@ export default defineComponent({