ant-design-vue/antdv-demo/docs/input-number/demo/basic.md

33 lines
438 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<cn>
#### 基本
数字输入框。
</cn>
<us>
#### Basic
Numeric-only input box.
</us>
```vue
<template>
<div>
<a-input-number id="inputNumber" v-model="value" :min="1" :max="10" @change="onChange" />
当前值{{ value }}
</div>
</template>
<script>
export default {
data() {
return {
value: 3,
};
},
methods: {
onChange(value) {
console.log('changed', value);
},
},
};
</script>
```