ant-design-vue/components/input-number/demo/basic.md

33 lines
443 B
Markdown
Raw Normal View History

2018-04-04 05:57:23 +00:00
<cn>
#### 基本
数字输入框。
</cn>
<us>
#### Basic
Numeric-only input box.
</us>
2019-10-09 10:32:23 +00:00
```tpl
2018-04-04 05:57:23 +00:00
<template>
<div>
<a-input-number :min="1" :max="10" v-model="value" @change="onChange" />
当前值:{{value}}
</div>
</template>
<script>
export default {
data() {
return {
2019-09-28 12:45:07 +00:00
value: 3,
};
2018-04-04 05:57:23 +00:00
},
methods: {
onChange(value) {
console.log('changed', value);
},
},
2019-09-28 12:45:07 +00:00
};
2018-04-04 05:57:23 +00:00
</script>
```