diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index f92ca793fa4..150de63138e 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -153,6 +153,8 @@ - `n-time` uses `formatDistanceStrict` rather than `formatDistance` in `date-fns`, closes [#2703](https://github.com/TuSimple/naive-ui/issues/2703). +- Fix `n-input-number` add `justify-icon` props for justify add,remove icon (like: [- 0 +]) + ### Fixes - Fix `n-tabs` has unexpected line animation when nested with `n-tabs`, closes [#2689](https://github.com/TuSimple/naive-ui/issues/2689). diff --git a/src/input-number/demos/enUS/index.demo-entry.md b/src/input-number/demos/enUS/index.demo-entry.md index 42fa07fbdf9..6f55ca191da 100644 --- a/src/input-number/demos/enUS/index.demo-entry.md +++ b/src/input-number/demos/enUS/index.demo-entry.md @@ -8,6 +8,7 @@ If you just want a number, this is for you. basic.vue disabled.vue event.vue +justify-icon.vue icon.vue loading.vue min-max.vue diff --git a/src/input-number/demos/enUS/justify-icon.demo.vue b/src/input-number/demos/enUS/justify-icon.demo.vue new file mode 100644 index 00000000000..9173d3c36ca --- /dev/null +++ b/src/input-number/demos/enUS/justify-icon.demo.vue @@ -0,0 +1,29 @@ + +# Justify Icon + + + diff --git a/src/input-number/src/InputNumber.tsx b/src/input-number/src/InputNumber.tsx index ea7e090fa59..b63342b86b8 100644 --- a/src/input-number/src/InputNumber.tsx +++ b/src/input-number/src/InputNumber.tsx @@ -69,6 +69,10 @@ const inputNumberProps = { type: Boolean, default: true }, + justifyIcon: { + type: Boolean, + default: false + }, readonly: Boolean, clearable: Boolean, keyboard: { @@ -562,7 +566,7 @@ export default defineComponent({ ]) }} - , + ,