We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce64daf commit 344b1acCopy full SHA for 344b1ac
src/uni_modules/wot-design-uni/components/wd-input-number/wd-input-number.vue
@@ -77,6 +77,7 @@ watch(
77
function updateBoundary() {
78
debounce(() => {
79
const value = formatValue(inputValue.value)
80
+ console.log(value, 'value')
81
if (!isEqual(inputValue.value, value)) {
82
setValue(value)
83
}
@@ -200,6 +201,12 @@ function formatValue(value: string | number) {
200
201
if (props.precision !== undefined) {
202
value = value.toFixed(props.precision)
203
204
+ if (value > props.max) {
205
+ value = props.max
206
+ }
207
+ if (value < props.min) {
208
+ value = props.min
209
210
211
return Number(value)
212
0 commit comments